mirror of
https://gitlab.kube.huskypup.net/Scooby/Homelabv4.git
synced 2026-08-20 23:16:49 +00:00
Fix ArgoCD ServerSideDiff permanent OutOfSync diffs
Add explicit CRD/API defaults to manifests that were causing ArgoCD's SSA dry-run to produce results different from live state: - HTTPRoutes: add group, kind, weight defaults to parentRefs/backendRefs - Kyverno ClusterPolicies: add skipBackgroundRequests, allowExistingViolations - Tetragon TracingPolicies: add return, maxData, resolve, returnCopy defaults - Gateway certificateRefs: add group="" default - Guacamole Gateway: add group="" to certificateRefs Add ignoreDifferences for resources that legitimately differ: - Cilium cert Secrets (auto-generated, data always differs) - Istio ValidatingWebhookConfiguration failurePolicy (istiod mutates) - Crowdsec LAPI Secrets (randomly generated) - ServiceMonitor/PodMonitor relabeling action defaults - StatefulSet volumeClaimTemplates apiVersion/kind defaults Persist argocd-cm ignoreDifferences config in ArgoCD Helm values. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
4270309224
commit
131cbca4a6
@@ -5,7 +5,9 @@ metadata:
|
|||||||
namespace: argocd
|
namespace: argocd
|
||||||
spec:
|
spec:
|
||||||
parentRefs:
|
parentRefs:
|
||||||
- name: edge
|
- group: gateway.networking.k8s.io
|
||||||
|
kind: Gateway
|
||||||
|
name: edge
|
||||||
namespace: gateway
|
namespace: gateway
|
||||||
sectionName: https
|
sectionName: https
|
||||||
hostnames:
|
hostnames:
|
||||||
@@ -16,5 +18,8 @@ spec:
|
|||||||
type: PathPrefix
|
type: PathPrefix
|
||||||
value: /
|
value: /
|
||||||
backendRefs:
|
backendRefs:
|
||||||
- name: argocd-server
|
- group: ""
|
||||||
|
kind: Service
|
||||||
|
name: argocd-server
|
||||||
port: 80
|
port: 80
|
||||||
|
weight: 1
|
||||||
|
|||||||
@@ -6,6 +6,36 @@ global:
|
|||||||
configs:
|
configs:
|
||||||
cm:
|
cm:
|
||||||
url: https://argocd.kube.huskypup.net
|
url: https://argocd.kube.huskypup.net
|
||||||
|
resource.customizations.ignoreDifferences.all: |
|
||||||
|
managedFieldsManagers:
|
||||||
|
- external-secrets
|
||||||
|
- istio-system
|
||||||
|
jqPathExpressions:
|
||||||
|
- .metadata.finalizers
|
||||||
|
resource.customizations.ignoreDifferences.external-secrets.io_ExternalSecret: |
|
||||||
|
jqPathExpressions:
|
||||||
|
- .metadata.annotations."force-sync"
|
||||||
|
- .metadata.annotations."reconcile.external-secrets.io/force-sync"
|
||||||
|
- .metadata.finalizers
|
||||||
|
- .spec.data[].remoteRef.conversionStrategy
|
||||||
|
- .spec.data[].remoteRef.decodingStrategy
|
||||||
|
- .spec.data[].remoteRef.metadataPolicy
|
||||||
|
resource.customizations.ignoreDifferences.gateway.networking.k8s.io_HTTPRoute: |
|
||||||
|
jqPathExpressions:
|
||||||
|
- .metadata.annotations
|
||||||
|
- .spec.parentRefs[].port
|
||||||
|
resource.customizations.ignoreDifferences.monitoring.coreos.com_ServiceMonitor: |
|
||||||
|
jqPathExpressions:
|
||||||
|
- .spec.endpoints[].relabelings[].action
|
||||||
|
- .spec.endpoints[].metricRelabelings[].action
|
||||||
|
resource.customizations.ignoreDifferences.monitoring.coreos.com_PodMonitor: |
|
||||||
|
jqPathExpressions:
|
||||||
|
- .spec.podMetricsEndpoints[].relabelings[].action
|
||||||
|
- .spec.podMetricsEndpoints[].metricRelabelings[].action
|
||||||
|
resource.customizations.ignoreDifferences.apps_StatefulSet: |
|
||||||
|
jqPathExpressions:
|
||||||
|
- .spec.volumeClaimTemplates[].apiVersion
|
||||||
|
- .spec.volumeClaimTemplates[].kind
|
||||||
oidc.config: |
|
oidc.config: |
|
||||||
name: Authentik
|
name: Authentik
|
||||||
issuer: https://auth.kube.huskypup.net/application/o/argocd/
|
issuer: https://auth.kube.huskypup.net/application/o/argocd/
|
||||||
|
|||||||
@@ -5,7 +5,9 @@ metadata:
|
|||||||
namespace: frigate
|
namespace: frigate
|
||||||
spec:
|
spec:
|
||||||
parentRefs:
|
parentRefs:
|
||||||
- name: edge
|
- group: gateway.networking.k8s.io
|
||||||
|
kind: Gateway
|
||||||
|
name: edge
|
||||||
namespace: gateway
|
namespace: gateway
|
||||||
sectionName: https
|
sectionName: https
|
||||||
hostnames:
|
hostnames:
|
||||||
@@ -16,5 +18,8 @@ spec:
|
|||||||
type: PathPrefix
|
type: PathPrefix
|
||||||
value: /
|
value: /
|
||||||
backendRefs:
|
backendRefs:
|
||||||
- name: frigate
|
- group: ""
|
||||||
|
kind: Service
|
||||||
|
name: frigate
|
||||||
port: 5000
|
port: 5000
|
||||||
|
weight: 1
|
||||||
|
|||||||
@@ -5,7 +5,9 @@ metadata:
|
|||||||
namespace: gitlab
|
namespace: gitlab
|
||||||
spec:
|
spec:
|
||||||
parentRefs:
|
parentRefs:
|
||||||
- name: edge
|
- group: gateway.networking.k8s.io
|
||||||
|
kind: Gateway
|
||||||
|
name: edge
|
||||||
namespace: gateway
|
namespace: gateway
|
||||||
sectionName: https
|
sectionName: https
|
||||||
hostnames:
|
hostnames:
|
||||||
@@ -16,8 +18,11 @@ spec:
|
|||||||
type: PathPrefix
|
type: PathPrefix
|
||||||
value: /
|
value: /
|
||||||
backendRefs:
|
backendRefs:
|
||||||
- name: gitlab-webservice-default
|
- group: ""
|
||||||
|
kind: Service
|
||||||
|
name: gitlab-webservice-default
|
||||||
port: 8181
|
port: 8181
|
||||||
|
weight: 1
|
||||||
|
|
||||||
---
|
---
|
||||||
apiVersion: gateway.networking.k8s.io/v1
|
apiVersion: gateway.networking.k8s.io/v1
|
||||||
@@ -27,7 +32,9 @@ metadata:
|
|||||||
namespace: gitlab
|
namespace: gitlab
|
||||||
spec:
|
spec:
|
||||||
parentRefs:
|
parentRefs:
|
||||||
- name: edge
|
- group: gateway.networking.k8s.io
|
||||||
|
kind: Gateway
|
||||||
|
name: edge
|
||||||
namespace: gateway
|
namespace: gateway
|
||||||
sectionName: https
|
sectionName: https
|
||||||
hostnames:
|
hostnames:
|
||||||
@@ -38,8 +45,11 @@ spec:
|
|||||||
type: PathPrefix
|
type: PathPrefix
|
||||||
value: /
|
value: /
|
||||||
backendRefs:
|
backendRefs:
|
||||||
- name: gitlab-registry
|
- group: ""
|
||||||
|
kind: Service
|
||||||
|
name: gitlab-registry
|
||||||
port: 5000
|
port: 5000
|
||||||
|
weight: 1
|
||||||
|
|
||||||
---
|
---
|
||||||
apiVersion: gateway.networking.k8s.io/v1
|
apiVersion: gateway.networking.k8s.io/v1
|
||||||
@@ -49,7 +59,9 @@ metadata:
|
|||||||
namespace: gitlab
|
namespace: gitlab
|
||||||
spec:
|
spec:
|
||||||
parentRefs:
|
parentRefs:
|
||||||
- name: edge
|
- group: gateway.networking.k8s.io
|
||||||
|
kind: Gateway
|
||||||
|
name: edge
|
||||||
namespace: gateway
|
namespace: gateway
|
||||||
sectionName: https
|
sectionName: https
|
||||||
hostnames:
|
hostnames:
|
||||||
@@ -60,8 +72,11 @@ spec:
|
|||||||
type: PathPrefix
|
type: PathPrefix
|
||||||
value: /
|
value: /
|
||||||
backendRefs:
|
backendRefs:
|
||||||
- name: gitlab-minio-svc
|
- group: ""
|
||||||
|
kind: Service
|
||||||
|
name: gitlab-minio-svc
|
||||||
port: 9000
|
port: 9000
|
||||||
|
weight: 1
|
||||||
|
|
||||||
---
|
---
|
||||||
apiVersion: gateway.networking.k8s.io/v1
|
apiVersion: gateway.networking.k8s.io/v1
|
||||||
@@ -71,7 +86,9 @@ metadata:
|
|||||||
namespace: gitlab
|
namespace: gitlab
|
||||||
spec:
|
spec:
|
||||||
parentRefs:
|
parentRefs:
|
||||||
- name: edge
|
- group: gateway.networking.k8s.io
|
||||||
|
kind: Gateway
|
||||||
|
name: edge
|
||||||
namespace: gateway
|
namespace: gateway
|
||||||
sectionName: https
|
sectionName: https
|
||||||
hostnames:
|
hostnames:
|
||||||
@@ -82,5 +99,8 @@ spec:
|
|||||||
type: PathPrefix
|
type: PathPrefix
|
||||||
value: /
|
value: /
|
||||||
backendRefs:
|
backendRefs:
|
||||||
- name: gitlab-kas
|
- group: ""
|
||||||
|
kind: Service
|
||||||
|
name: gitlab-kas
|
||||||
port: 8154
|
port: 8154
|
||||||
|
weight: 1
|
||||||
|
|||||||
@@ -27,7 +27,8 @@ spec:
|
|||||||
tls:
|
tls:
|
||||||
mode: Terminate
|
mode: Terminate
|
||||||
certificateRefs:
|
certificateRefs:
|
||||||
- kind: Secret
|
- group: ""
|
||||||
|
kind: Secret
|
||||||
name: guacamole-envoy-tls
|
name: guacamole-envoy-tls
|
||||||
|
|
||||||
---
|
---
|
||||||
@@ -38,7 +39,9 @@ metadata:
|
|||||||
namespace: guacamole
|
namespace: guacamole
|
||||||
spec:
|
spec:
|
||||||
parentRefs:
|
parentRefs:
|
||||||
- name: guacamole
|
- group: gateway.networking.k8s.io
|
||||||
|
kind: Gateway
|
||||||
|
name: guacamole
|
||||||
sectionName: https
|
sectionName: https
|
||||||
hostnames:
|
hostnames:
|
||||||
- guacamole.kube.huskypup.net
|
- guacamole.kube.huskypup.net
|
||||||
@@ -55,13 +58,19 @@ spec:
|
|||||||
type: ReplacePrefixMatch
|
type: ReplacePrefixMatch
|
||||||
replacePrefixMatch: /
|
replacePrefixMatch: /
|
||||||
backendRefs:
|
backendRefs:
|
||||||
- name: guacamole
|
- group: ""
|
||||||
|
kind: Service
|
||||||
|
name: guacamole
|
||||||
port: 8080
|
port: 8080
|
||||||
|
weight: 1
|
||||||
# Standard root routing
|
# Standard root routing
|
||||||
- matches:
|
- matches:
|
||||||
- path:
|
- path:
|
||||||
type: PathPrefix
|
type: PathPrefix
|
||||||
value: /
|
value: /
|
||||||
backendRefs:
|
backendRefs:
|
||||||
- name: guacamole
|
- group: ""
|
||||||
|
kind: Service
|
||||||
|
name: guacamole
|
||||||
port: 8080
|
port: 8080
|
||||||
|
weight: 1
|
||||||
|
|||||||
@@ -5,7 +5,9 @@ metadata:
|
|||||||
namespace: home-assistant
|
namespace: home-assistant
|
||||||
spec:
|
spec:
|
||||||
parentRefs:
|
parentRefs:
|
||||||
- name: edge
|
- group: gateway.networking.k8s.io
|
||||||
|
kind: Gateway
|
||||||
|
name: edge
|
||||||
namespace: gateway
|
namespace: gateway
|
||||||
sectionName: https
|
sectionName: https
|
||||||
hostnames:
|
hostnames:
|
||||||
@@ -16,5 +18,8 @@ spec:
|
|||||||
type: PathPrefix
|
type: PathPrefix
|
||||||
value: /
|
value: /
|
||||||
backendRefs:
|
backendRefs:
|
||||||
- name: esphome
|
- group: ""
|
||||||
|
kind: Service
|
||||||
|
name: esphome
|
||||||
port: 6052
|
port: 6052
|
||||||
|
weight: 1
|
||||||
|
|||||||
@@ -5,7 +5,9 @@ metadata:
|
|||||||
namespace: home-assistant
|
namespace: home-assistant
|
||||||
spec:
|
spec:
|
||||||
parentRefs:
|
parentRefs:
|
||||||
- name: edge
|
- group: gateway.networking.k8s.io
|
||||||
|
kind: Gateway
|
||||||
|
name: edge
|
||||||
namespace: gateway
|
namespace: gateway
|
||||||
sectionName: https
|
sectionName: https
|
||||||
hostnames:
|
hostnames:
|
||||||
@@ -16,5 +18,8 @@ spec:
|
|||||||
type: PathPrefix
|
type: PathPrefix
|
||||||
value: /
|
value: /
|
||||||
backendRefs:
|
backendRefs:
|
||||||
- name: home-assistant
|
- group: ""
|
||||||
|
kind: Service
|
||||||
|
name: home-assistant
|
||||||
port: 8123
|
port: 8123
|
||||||
|
weight: 1
|
||||||
|
|||||||
@@ -5,7 +5,9 @@ metadata:
|
|||||||
namespace: n8n
|
namespace: n8n
|
||||||
spec:
|
spec:
|
||||||
parentRefs:
|
parentRefs:
|
||||||
- name: edge
|
- group: gateway.networking.k8s.io
|
||||||
|
kind: Gateway
|
||||||
|
name: edge
|
||||||
namespace: gateway
|
namespace: gateway
|
||||||
sectionName: https
|
sectionName: https
|
||||||
hostnames:
|
hostnames:
|
||||||
@@ -16,5 +18,8 @@ spec:
|
|||||||
type: PathPrefix
|
type: PathPrefix
|
||||||
value: /
|
value: /
|
||||||
backendRefs:
|
backendRefs:
|
||||||
- name: n8n
|
- group: ""
|
||||||
|
kind: Service
|
||||||
|
name: n8n
|
||||||
port: 80
|
port: 80
|
||||||
|
weight: 1
|
||||||
|
|||||||
@@ -5,7 +5,9 @@ metadata:
|
|||||||
namespace: nextcloud
|
namespace: nextcloud
|
||||||
spec:
|
spec:
|
||||||
parentRefs:
|
parentRefs:
|
||||||
- name: edge
|
- group: gateway.networking.k8s.io
|
||||||
|
kind: Gateway
|
||||||
|
name: edge
|
||||||
namespace: gateway
|
namespace: gateway
|
||||||
sectionName: https
|
sectionName: https
|
||||||
hostnames:
|
hostnames:
|
||||||
@@ -16,5 +18,8 @@ spec:
|
|||||||
type: PathPrefix
|
type: PathPrefix
|
||||||
value: /
|
value: /
|
||||||
backendRefs:
|
backendRefs:
|
||||||
- name: nextcloud
|
- group: ""
|
||||||
|
kind: Service
|
||||||
|
name: nextcloud
|
||||||
port: 8080
|
port: 8080
|
||||||
|
weight: 1
|
||||||
|
|||||||
@@ -5,7 +5,9 @@ metadata:
|
|||||||
namespace: teslamate
|
namespace: teslamate
|
||||||
spec:
|
spec:
|
||||||
parentRefs:
|
parentRefs:
|
||||||
- name: edge
|
- group: gateway.networking.k8s.io
|
||||||
|
kind: Gateway
|
||||||
|
name: edge
|
||||||
namespace: gateway
|
namespace: gateway
|
||||||
sectionName: https
|
sectionName: https
|
||||||
hostnames:
|
hostnames:
|
||||||
@@ -16,5 +18,8 @@ spec:
|
|||||||
type: PathPrefix
|
type: PathPrefix
|
||||||
value: /
|
value: /
|
||||||
backendRefs:
|
backendRefs:
|
||||||
- name: teslamate
|
- group: ""
|
||||||
|
kind: Service
|
||||||
|
name: teslamate
|
||||||
port: 4000
|
port: 4000
|
||||||
|
weight: 1
|
||||||
|
|||||||
@@ -9,6 +9,26 @@ metadata:
|
|||||||
- resources-finalizer.argocd.argoproj.io
|
- resources-finalizer.argocd.argoproj.io
|
||||||
spec:
|
spec:
|
||||||
project: infrastructure
|
project: infrastructure
|
||||||
|
ignoreDifferences:
|
||||||
|
- group: ""
|
||||||
|
kind: Secret
|
||||||
|
name: cilium-ca
|
||||||
|
jsonPointers:
|
||||||
|
- /data
|
||||||
|
- group: ""
|
||||||
|
kind: Secret
|
||||||
|
name: hubble-relay-client-certs
|
||||||
|
jsonPointers:
|
||||||
|
- /data
|
||||||
|
- group: ""
|
||||||
|
kind: Secret
|
||||||
|
name: hubble-server-certs
|
||||||
|
jsonPointers:
|
||||||
|
- /data
|
||||||
|
- group: monitoring.coreos.com
|
||||||
|
kind: ServiceMonitor
|
||||||
|
jqPathExpressions:
|
||||||
|
- .spec.endpoints[].relabelings[].action
|
||||||
sources:
|
sources:
|
||||||
- repoURL: https://helm.cilium.io
|
- repoURL: https://helm.cilium.io
|
||||||
chart: cilium
|
chart: cilium
|
||||||
|
|||||||
@@ -9,6 +9,12 @@ metadata:
|
|||||||
- resources-finalizer.argocd.argoproj.io
|
- resources-finalizer.argocd.argoproj.io
|
||||||
spec:
|
spec:
|
||||||
project: infrastructure
|
project: infrastructure
|
||||||
|
ignoreDifferences:
|
||||||
|
- group: ""
|
||||||
|
kind: Secret
|
||||||
|
name: crowdsec-lapi-secrets
|
||||||
|
jsonPointers:
|
||||||
|
- /data
|
||||||
sources:
|
sources:
|
||||||
- repoURL: https://crowdsecurity.github.io/helm-charts
|
- repoURL: https://crowdsecurity.github.io/helm-charts
|
||||||
chart: crowdsec
|
chart: crowdsec
|
||||||
|
|||||||
@@ -9,6 +9,11 @@ metadata:
|
|||||||
- resources-finalizer.argocd.argoproj.io
|
- resources-finalizer.argocd.argoproj.io
|
||||||
spec:
|
spec:
|
||||||
project: infrastructure
|
project: infrastructure
|
||||||
|
ignoreDifferences:
|
||||||
|
- group: admissionregistration.k8s.io
|
||||||
|
kind: ValidatingWebhookConfiguration
|
||||||
|
jqPathExpressions:
|
||||||
|
- .webhooks[].failurePolicy
|
||||||
source:
|
source:
|
||||||
repoURL: https://istio-release.storage.googleapis.com/charts
|
repoURL: https://istio-release.storage.googleapis.com/charts
|
||||||
chart: base
|
chart: base
|
||||||
|
|||||||
@@ -9,6 +9,11 @@ metadata:
|
|||||||
- resources-finalizer.argocd.argoproj.io
|
- resources-finalizer.argocd.argoproj.io
|
||||||
spec:
|
spec:
|
||||||
project: infrastructure
|
project: infrastructure
|
||||||
|
ignoreDifferences:
|
||||||
|
- group: admissionregistration.k8s.io
|
||||||
|
kind: ValidatingWebhookConfiguration
|
||||||
|
jqPathExpressions:
|
||||||
|
- .webhooks[].failurePolicy
|
||||||
sources:
|
sources:
|
||||||
- repoURL: https://istio-release.storage.googleapis.com/charts
|
- repoURL: https://istio-release.storage.googleapis.com/charts
|
||||||
chart: istiod
|
chart: istiod
|
||||||
|
|||||||
@@ -5,7 +5,9 @@ metadata:
|
|||||||
namespace: authentik
|
namespace: authentik
|
||||||
spec:
|
spec:
|
||||||
parentRefs:
|
parentRefs:
|
||||||
- name: edge
|
- group: gateway.networking.k8s.io
|
||||||
|
kind: Gateway
|
||||||
|
name: edge
|
||||||
namespace: gateway
|
namespace: gateway
|
||||||
sectionName: https
|
sectionName: https
|
||||||
hostnames:
|
hostnames:
|
||||||
@@ -16,5 +18,8 @@ spec:
|
|||||||
type: PathPrefix
|
type: PathPrefix
|
||||||
value: /
|
value: /
|
||||||
backendRefs:
|
backendRefs:
|
||||||
- name: authentik-server
|
- group: ""
|
||||||
|
kind: Service
|
||||||
|
name: authentik-server
|
||||||
port: 80
|
port: 80
|
||||||
|
weight: 1
|
||||||
|
|||||||
@@ -82,7 +82,8 @@ spec:
|
|||||||
tls:
|
tls:
|
||||||
mode: Terminate
|
mode: Terminate
|
||||||
certificateRefs:
|
certificateRefs:
|
||||||
- kind: Secret
|
- group: ""
|
||||||
|
kind: Secret
|
||||||
name: edge-wildcard-kube-huskypup-net
|
name: edge-wildcard-kube-huskypup-net
|
||||||
allowedRoutes:
|
allowedRoutes:
|
||||||
namespaces:
|
namespaces:
|
||||||
|
|||||||
@@ -5,7 +5,9 @@ metadata:
|
|||||||
namespace: grafana
|
namespace: grafana
|
||||||
spec:
|
spec:
|
||||||
parentRefs:
|
parentRefs:
|
||||||
- name: edge
|
- group: gateway.networking.k8s.io
|
||||||
|
kind: Gateway
|
||||||
|
name: edge
|
||||||
namespace: gateway
|
namespace: gateway
|
||||||
sectionName: https
|
sectionName: https
|
||||||
hostnames:
|
hostnames:
|
||||||
@@ -16,5 +18,8 @@ spec:
|
|||||||
type: PathPrefix
|
type: PathPrefix
|
||||||
value: /
|
value: /
|
||||||
backendRefs:
|
backendRefs:
|
||||||
- name: grafana
|
- group: ""
|
||||||
|
kind: Service
|
||||||
|
name: grafana
|
||||||
port: 80
|
port: 80
|
||||||
|
weight: 1
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ spec:
|
|||||||
background: true
|
background: true
|
||||||
rules:
|
rules:
|
||||||
- name: validate-automount
|
- name: validate-automount
|
||||||
|
skipBackgroundRequests: true
|
||||||
match:
|
match:
|
||||||
any:
|
any:
|
||||||
- resources:
|
- resources:
|
||||||
@@ -60,6 +61,7 @@ spec:
|
|||||||
- n8n
|
- n8n
|
||||||
- nessus
|
- nessus
|
||||||
validate:
|
validate:
|
||||||
|
allowExistingViolations: true
|
||||||
message: >-
|
message: >-
|
||||||
Pods should set automountServiceAccountToken to false unless API
|
Pods should set automountServiceAccountToken to false unless API
|
||||||
access is required (STIG V-242382).
|
access is required (STIG V-242382).
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ spec:
|
|||||||
background: true
|
background: true
|
||||||
rules:
|
rules:
|
||||||
- name: validate-namespace
|
- name: validate-namespace
|
||||||
|
skipBackgroundRequests: true
|
||||||
match:
|
match:
|
||||||
any:
|
any:
|
||||||
- resources:
|
- resources:
|
||||||
@@ -27,6 +28,7 @@ spec:
|
|||||||
namespaces:
|
namespaces:
|
||||||
- default
|
- default
|
||||||
validate:
|
validate:
|
||||||
|
allowExistingViolations: true
|
||||||
message: >-
|
message: >-
|
||||||
Workloads must not run in the default namespace (STIG V-242383).
|
Workloads must not run in the default namespace (STIG V-242383).
|
||||||
Create a dedicated namespace for your application.
|
Create a dedicated namespace for your application.
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ spec:
|
|||||||
background: true
|
background: true
|
||||||
rules:
|
rules:
|
||||||
- name: host-namespaces
|
- name: host-namespaces
|
||||||
|
skipBackgroundRequests: true
|
||||||
match:
|
match:
|
||||||
any:
|
any:
|
||||||
- resources:
|
- resources:
|
||||||
@@ -31,6 +32,7 @@ spec:
|
|||||||
- kyverno
|
- kyverno
|
||||||
- crowdsec
|
- crowdsec
|
||||||
validate:
|
validate:
|
||||||
|
allowExistingViolations: true
|
||||||
message: >-
|
message: >-
|
||||||
Sharing host PID, IPC, or network namespaces is not allowed (STIG V-242386).
|
Sharing host PID, IPC, or network namespaces is not allowed (STIG V-242386).
|
||||||
pattern:
|
pattern:
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ spec:
|
|||||||
background: true
|
background: true
|
||||||
rules:
|
rules:
|
||||||
- name: disallow-latest
|
- name: disallow-latest
|
||||||
|
skipBackgroundRequests: true
|
||||||
match:
|
match:
|
||||||
any:
|
any:
|
||||||
- resources:
|
- resources:
|
||||||
@@ -25,6 +26,7 @@ spec:
|
|||||||
- crowdsec
|
- crowdsec
|
||||||
- home-assistant
|
- home-assistant
|
||||||
validate:
|
validate:
|
||||||
|
allowExistingViolations: true
|
||||||
message: "Using ':latest' image tag is not allowed. Specify an explicit tag."
|
message: "Using ':latest' image tag is not allowed. Specify an explicit tag."
|
||||||
pattern:
|
pattern:
|
||||||
spec:
|
spec:
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ spec:
|
|||||||
background: true
|
background: true
|
||||||
rules:
|
rules:
|
||||||
- name: disallow-nodeport
|
- name: disallow-nodeport
|
||||||
|
skipBackgroundRequests: true
|
||||||
match:
|
match:
|
||||||
any:
|
any:
|
||||||
- resources:
|
- resources:
|
||||||
@@ -23,6 +24,7 @@ spec:
|
|||||||
- kube-system
|
- kube-system
|
||||||
- istio-system
|
- istio-system
|
||||||
validate:
|
validate:
|
||||||
|
allowExistingViolations: true
|
||||||
message: "NodePort services are not allowed. Use ClusterIP or LoadBalancer."
|
message: "NodePort services are not allowed. Use ClusterIP or LoadBalancer."
|
||||||
pattern:
|
pattern:
|
||||||
spec:
|
spec:
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ spec:
|
|||||||
background: true
|
background: true
|
||||||
rules:
|
rules:
|
||||||
- name: disallow-privileged
|
- name: disallow-privileged
|
||||||
|
skipBackgroundRequests: true
|
||||||
match:
|
match:
|
||||||
any:
|
any:
|
||||||
- resources:
|
- resources:
|
||||||
@@ -29,6 +30,7 @@ spec:
|
|||||||
- tetragon
|
- tetragon
|
||||||
- crowdsec
|
- crowdsec
|
||||||
validate:
|
validate:
|
||||||
|
allowExistingViolations: true
|
||||||
message: "Privileged containers are not allowed."
|
message: "Privileged containers are not allowed."
|
||||||
pattern:
|
pattern:
|
||||||
spec:
|
spec:
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ spec:
|
|||||||
background: true
|
background: true
|
||||||
rules:
|
rules:
|
||||||
- name: require-drop-all
|
- name: require-drop-all
|
||||||
|
skipBackgroundRequests: true
|
||||||
match:
|
match:
|
||||||
any:
|
any:
|
||||||
- resources:
|
- resources:
|
||||||
@@ -55,6 +56,7 @@ spec:
|
|||||||
- checkov
|
- checkov
|
||||||
- external-secrets
|
- external-secrets
|
||||||
validate:
|
validate:
|
||||||
|
allowExistingViolations: true
|
||||||
message: >-
|
message: >-
|
||||||
Containers must drop ALL capabilities (STIG V-242398).
|
Containers must drop ALL capabilities (STIG V-242398).
|
||||||
Add securityContext.capabilities.drop: ["ALL"] to each container.
|
Add securityContext.capabilities.drop: ["ALL"] to each container.
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ spec:
|
|||||||
background: true
|
background: true
|
||||||
rules:
|
rules:
|
||||||
- name: check-namespace-ambient-label
|
- name: check-namespace-ambient-label
|
||||||
|
skipBackgroundRequests: true
|
||||||
match:
|
match:
|
||||||
any:
|
any:
|
||||||
- resources:
|
- resources:
|
||||||
@@ -74,6 +75,7 @@ spec:
|
|||||||
- user-*
|
- user-*
|
||||||
- cluster-fleet-*
|
- cluster-fleet-*
|
||||||
validate:
|
validate:
|
||||||
|
allowExistingViolations: true
|
||||||
message: "Application namespaces must have istio.io/dataplane-mode=ambient for zero-trust mTLS."
|
message: "Application namespaces must have istio.io/dataplane-mode=ambient for zero-trust mTLS."
|
||||||
pattern:
|
pattern:
|
||||||
metadata:
|
metadata:
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ spec:
|
|||||||
background: true
|
background: true
|
||||||
rules:
|
rules:
|
||||||
- name: require-app-label
|
- name: require-app-label
|
||||||
|
skipBackgroundRequests: true
|
||||||
match:
|
match:
|
||||||
any:
|
any:
|
||||||
- resources:
|
- resources:
|
||||||
@@ -33,6 +34,7 @@ spec:
|
|||||||
- scylla-operator
|
- scylla-operator
|
||||||
- cert-manager
|
- cert-manager
|
||||||
validate:
|
validate:
|
||||||
|
allowExistingViolations: true
|
||||||
message: "The label 'app' or 'app.kubernetes.io/name' is required."
|
message: "The label 'app' or 'app.kubernetes.io/name' is required."
|
||||||
anyPattern:
|
anyPattern:
|
||||||
- metadata:
|
- metadata:
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ spec:
|
|||||||
background: true
|
background: true
|
||||||
rules:
|
rules:
|
||||||
- name: require-run-as-non-root
|
- name: require-run-as-non-root
|
||||||
|
skipBackgroundRequests: true
|
||||||
match:
|
match:
|
||||||
any:
|
any:
|
||||||
- resources:
|
- resources:
|
||||||
@@ -27,6 +28,7 @@ spec:
|
|||||||
- kyverno
|
- kyverno
|
||||||
- tetragon
|
- tetragon
|
||||||
validate:
|
validate:
|
||||||
|
allowExistingViolations: true
|
||||||
message: "Containers must run as non-root. Set runAsNonRoot to true."
|
message: "Containers must run as non-root. Set runAsNonRoot to true."
|
||||||
pattern:
|
pattern:
|
||||||
spec:
|
spec:
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ spec:
|
|||||||
background: true
|
background: true
|
||||||
rules:
|
rules:
|
||||||
- name: require-probes
|
- name: require-probes
|
||||||
|
skipBackgroundRequests: true
|
||||||
match:
|
match:
|
||||||
any:
|
any:
|
||||||
- resources:
|
- resources:
|
||||||
@@ -44,6 +45,7 @@ spec:
|
|||||||
- nextcloud
|
- nextcloud
|
||||||
- scylla-manager
|
- scylla-manager
|
||||||
validate:
|
validate:
|
||||||
|
allowExistingViolations: true
|
||||||
message: "Liveness and readiness probes are required for all containers."
|
message: "Liveness and readiness probes are required for all containers."
|
||||||
pattern:
|
pattern:
|
||||||
spec:
|
spec:
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ spec:
|
|||||||
background: true
|
background: true
|
||||||
rules:
|
rules:
|
||||||
- name: require-limits
|
- name: require-limits
|
||||||
|
skipBackgroundRequests: true
|
||||||
match:
|
match:
|
||||||
any:
|
any:
|
||||||
- resources:
|
- resources:
|
||||||
@@ -53,6 +54,7 @@ spec:
|
|||||||
- checkov
|
- checkov
|
||||||
- scylla-manager
|
- scylla-manager
|
||||||
validate:
|
validate:
|
||||||
|
allowExistingViolations: true
|
||||||
message: "All containers must have CPU and memory limits defined."
|
message: "All containers must have CPU and memory limits defined."
|
||||||
pattern:
|
pattern:
|
||||||
spec:
|
spec:
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ spec:
|
|||||||
background: true
|
background: true
|
||||||
rules:
|
rules:
|
||||||
- name: require-ro-rootfs
|
- name: require-ro-rootfs
|
||||||
|
skipBackgroundRequests: true
|
||||||
match:
|
match:
|
||||||
any:
|
any:
|
||||||
- resources:
|
- resources:
|
||||||
@@ -31,6 +32,7 @@ spec:
|
|||||||
- nextcloud
|
- nextcloud
|
||||||
- home-assistant
|
- home-assistant
|
||||||
validate:
|
validate:
|
||||||
|
allowExistingViolations: true
|
||||||
message: "Containers should use a read-only root filesystem."
|
message: "Containers should use a read-only root filesystem."
|
||||||
pattern:
|
pattern:
|
||||||
spec:
|
spec:
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ spec:
|
|||||||
background: true
|
background: true
|
||||||
rules:
|
rules:
|
||||||
- name: validate-container-registries
|
- name: validate-container-registries
|
||||||
|
skipBackgroundRequests: true
|
||||||
match:
|
match:
|
||||||
any:
|
any:
|
||||||
- resources:
|
- resources:
|
||||||
@@ -29,6 +30,7 @@ spec:
|
|||||||
- kube-node-lease
|
- kube-node-lease
|
||||||
- kyverno
|
- kyverno
|
||||||
validate:
|
validate:
|
||||||
|
allowExistingViolations: true
|
||||||
message: >-
|
message: >-
|
||||||
Images must come from allowed registries: docker.io, ghcr.io, quay.io,
|
Images must come from allowed registries: docker.io, ghcr.io, quay.io,
|
||||||
registry.k8s.io, gcr.io, lscr.io, registry.gitlab.com, cr.fluentbit.io,
|
registry.k8s.io, gcr.io, lscr.io, registry.gitlab.com, cr.fluentbit.io,
|
||||||
|
|||||||
@@ -5,7 +5,9 @@ metadata:
|
|||||||
namespace: prometheus
|
namespace: prometheus
|
||||||
spec:
|
spec:
|
||||||
parentRefs:
|
parentRefs:
|
||||||
- name: edge
|
- group: gateway.networking.k8s.io
|
||||||
|
kind: Gateway
|
||||||
|
name: edge
|
||||||
namespace: gateway
|
namespace: gateway
|
||||||
sectionName: https
|
sectionName: https
|
||||||
hostnames:
|
hostnames:
|
||||||
@@ -16,5 +18,8 @@ spec:
|
|||||||
type: PathPrefix
|
type: PathPrefix
|
||||||
value: /
|
value: /
|
||||||
backendRefs:
|
backendRefs:
|
||||||
- name: kube-prometheus-stack-prometheus
|
- group: ""
|
||||||
|
kind: Service
|
||||||
|
name: kube-prometheus-stack-prometheus
|
||||||
port: 9090
|
port: 9090
|
||||||
|
weight: 1
|
||||||
|
|||||||
@@ -5,7 +5,9 @@ metadata:
|
|||||||
namespace: rook-ceph
|
namespace: rook-ceph
|
||||||
spec:
|
spec:
|
||||||
parentRefs:
|
parentRefs:
|
||||||
- name: edge
|
- group: gateway.networking.k8s.io
|
||||||
|
kind: Gateway
|
||||||
|
name: edge
|
||||||
namespace: gateway
|
namespace: gateway
|
||||||
sectionName: https
|
sectionName: https
|
||||||
hostnames:
|
hostnames:
|
||||||
@@ -19,3 +21,4 @@ spec:
|
|||||||
- group: gateway.envoyproxy.io
|
- group: gateway.envoyproxy.io
|
||||||
kind: Backend
|
kind: Backend
|
||||||
name: ceph-dashboard
|
name: ceph-dashboard
|
||||||
|
weight: 1
|
||||||
|
|||||||
@@ -6,9 +6,13 @@ spec:
|
|||||||
kprobes:
|
kprobes:
|
||||||
- call: tcp_connect
|
- call: tcp_connect
|
||||||
syscall: false
|
syscall: false
|
||||||
|
return: false
|
||||||
args:
|
args:
|
||||||
- index: 0
|
- index: 0
|
||||||
type: sock
|
type: sock
|
||||||
|
maxData: false
|
||||||
|
resolve: ""
|
||||||
|
returnCopy: false
|
||||||
selectors:
|
selectors:
|
||||||
- matchArgs:
|
- matchArgs:
|
||||||
- index: 0
|
- index: 0
|
||||||
|
|||||||
@@ -6,17 +6,25 @@ spec:
|
|||||||
kprobes:
|
kprobes:
|
||||||
- call: tcp_connect
|
- call: tcp_connect
|
||||||
syscall: false
|
syscall: false
|
||||||
|
return: false
|
||||||
args:
|
args:
|
||||||
- index: 0
|
- index: 0
|
||||||
type: sock
|
type: sock
|
||||||
|
maxData: false
|
||||||
|
resolve: ""
|
||||||
|
returnCopy: false
|
||||||
selectors:
|
selectors:
|
||||||
- matchActions:
|
- matchActions:
|
||||||
- action: Post
|
- action: Post
|
||||||
- call: tcp_close
|
- call: tcp_close
|
||||||
syscall: false
|
syscall: false
|
||||||
|
return: false
|
||||||
args:
|
args:
|
||||||
- index: 0
|
- index: 0
|
||||||
type: sock
|
type: sock
|
||||||
|
maxData: false
|
||||||
|
resolve: ""
|
||||||
|
returnCopy: false
|
||||||
selectors:
|
selectors:
|
||||||
- matchActions:
|
- matchActions:
|
||||||
- action: Post
|
- action: Post
|
||||||
|
|||||||
@@ -6,9 +6,13 @@ spec:
|
|||||||
kprobes:
|
kprobes:
|
||||||
- call: __x64_sys_setuid
|
- call: __x64_sys_setuid
|
||||||
syscall: true
|
syscall: true
|
||||||
|
return: false
|
||||||
args:
|
args:
|
||||||
- index: 0
|
- index: 0
|
||||||
type: int
|
type: int
|
||||||
|
maxData: false
|
||||||
|
resolve: ""
|
||||||
|
returnCopy: false
|
||||||
selectors:
|
selectors:
|
||||||
- matchArgs:
|
- matchArgs:
|
||||||
- index: 0
|
- index: 0
|
||||||
@@ -19,9 +23,13 @@ spec:
|
|||||||
- action: Post
|
- action: Post
|
||||||
- call: __x64_sys_setgid
|
- call: __x64_sys_setgid
|
||||||
syscall: true
|
syscall: true
|
||||||
|
return: false
|
||||||
args:
|
args:
|
||||||
- index: 0
|
- index: 0
|
||||||
type: int
|
type: int
|
||||||
|
maxData: false
|
||||||
|
resolve: ""
|
||||||
|
returnCopy: false
|
||||||
selectors:
|
selectors:
|
||||||
- matchArgs:
|
- matchArgs:
|
||||||
- index: 0
|
- index: 0
|
||||||
|
|||||||
@@ -9,6 +9,9 @@ spec:
|
|||||||
args:
|
args:
|
||||||
- index: 4
|
- index: 4
|
||||||
type: syscall64
|
type: syscall64
|
||||||
|
maxData: false
|
||||||
|
resolve: ""
|
||||||
|
returnCopy: false
|
||||||
selectors:
|
selectors:
|
||||||
- matchArgs:
|
- matchArgs:
|
||||||
- index: 4
|
- index: 4
|
||||||
|
|||||||
@@ -6,11 +6,18 @@ spec:
|
|||||||
kprobes:
|
kprobes:
|
||||||
- call: fd_install
|
- call: fd_install
|
||||||
syscall: false
|
syscall: false
|
||||||
|
return: false
|
||||||
args:
|
args:
|
||||||
- index: 0
|
- index: 0
|
||||||
type: int
|
type: int
|
||||||
|
maxData: false
|
||||||
|
resolve: ""
|
||||||
|
returnCopy: false
|
||||||
- index: 1
|
- index: 1
|
||||||
type: file
|
type: file
|
||||||
|
maxData: false
|
||||||
|
resolve: ""
|
||||||
|
returnCopy: false
|
||||||
selectors:
|
selectors:
|
||||||
- matchArgs:
|
- matchArgs:
|
||||||
- index: 1
|
- index: 1
|
||||||
|
|||||||
@@ -5,7 +5,9 @@ metadata:
|
|||||||
namespace: vault
|
namespace: vault
|
||||||
spec:
|
spec:
|
||||||
parentRefs:
|
parentRefs:
|
||||||
- name: edge
|
- group: gateway.networking.k8s.io
|
||||||
|
kind: Gateway
|
||||||
|
name: edge
|
||||||
namespace: gateway
|
namespace: gateway
|
||||||
sectionName: https
|
sectionName: https
|
||||||
hostnames:
|
hostnames:
|
||||||
@@ -16,5 +18,8 @@ spec:
|
|||||||
type: PathPrefix
|
type: PathPrefix
|
||||||
value: /
|
value: /
|
||||||
backendRefs:
|
backendRefs:
|
||||||
- name: vault
|
- group: ""
|
||||||
|
kind: Service
|
||||||
|
name: vault
|
||||||
port: 8200
|
port: 8200
|
||||||
|
weight: 1
|
||||||
|
|||||||
Reference in New Issue
Block a user