Skip to content

Commit

Permalink
🧹 Remove k8s PSPs and bump deps to v0.30
Browse files Browse the repository at this point in the history
Fixed: #2883

Signed-off-by: Christian Zunker <[email protected]>
  • Loading branch information
czunker committed May 10, 2024
1 parent b3d38e3 commit 6e14993
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 352 deletions.
25 changes: 6 additions & 19 deletions providers/k8s/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,9 @@ module go.mondoo.com/cnquery/v11/providers/k8s

replace go.mondoo.com/cnquery/v11 => ../..

// We need the k8s packages to be pinned to 0.28.4 because we use PodSecurityPolicies
replace k8s.io/api => k8s.io/api v0.28.4
go 1.22.0

replace k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.28.4

replace k8s.io/apimachinery => k8s.io/apimachinery v0.28.4

replace k8s.io/client-go => k8s.io/client-go v0.28.4

go 1.22

toolchain go1.22.0
toolchain go1.22.2

require (
github.com/cockroachdb/errors v1.11.1
Expand All @@ -23,14 +14,10 @@ require (
github.com/rs/zerolog v1.32.0
github.com/stretchr/testify v1.9.0
go.mondoo.com/cnquery/v11 v11.2.0
// pin v0.28.4
k8s.io/api v0.28.4
// pin v0.28.4
k8s.io/api v0.30.0
k8s.io/apiextensions-apiserver v0.28.4
// pin v0.28.4
k8s.io/apimachinery v0.28.4
// pin v0.28.4
k8s.io/client-go v0.28.4
k8s.io/apimachinery v0.30.0
k8s.io/client-go v0.30.0
k8s.io/klog/v2 v2.120.1
k8s.io/utils v0.0.0-20240502163921-fe8a2dddb1d0
)
Expand Down Expand Up @@ -399,7 +386,7 @@ require (
honnef.co/go/tools v0.4.7 // indirect
howett.net/plist v1.0.1 // indirect
k8s.io/component-base v0.28.4 // indirect
k8s.io/kube-openapi v0.0.0-20240220201932-37d671a357a5 // indirect
k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 // indirect
k8s.io/kubelet v0.28.4 // indirect
modernc.org/libc v1.50.5 // indirect
modernc.org/mathutil v1.6.0 // indirect
Expand Down
16 changes: 8 additions & 8 deletions providers/k8s/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1697,20 +1697,20 @@ honnef.co/go/tools v0.4.7 h1:9MDAWxMoSnB6QoSqiVr7P5mtkT9pOc1kSxchzPCnqJs=
honnef.co/go/tools v0.4.7/go.mod h1:+rnGS1THNh8zMwnd2oVOTL9QF6vmfyG6ZXBULae2uc0=
howett.net/plist v1.0.1 h1:37GdZ8tP09Q35o9ych3ehygcsL+HqKSwzctveSlarvM=
howett.net/plist v1.0.1/go.mod h1:lqaXoTrLY4hg8tnEzNru53gicrbv7rrk+2xJA/7hw9g=
k8s.io/api v0.28.4 h1:8ZBrLjwosLl/NYgv1P7EQLqoO8MGQApnbgH8tu3BMzY=
k8s.io/api v0.28.4/go.mod h1:axWTGrY88s/5YE+JSt4uUi6NMM+gur1en2REMR7IRj0=
k8s.io/api v0.30.0 h1:siWhRq7cNjy2iHssOB9SCGNCl2spiF1dO3dABqZ8niA=
k8s.io/api v0.30.0/go.mod h1:OPlaYhoHs8EQ1ql0R/TsUgaRPhpKNxIMrKQfWUp8QSE=
k8s.io/apiextensions-apiserver v0.28.4 h1:AZpKY/7wQ8n+ZYDtNHbAJBb+N4AXXJvyZx6ww6yAJvU=
k8s.io/apiextensions-apiserver v0.28.4/go.mod h1:pgQIZ1U8eJSMQcENew/0ShUTlePcSGFq6dxSxf2mwPM=
k8s.io/apimachinery v0.28.4 h1:zOSJe1mc+GxuMnFzD4Z/U1wst50X28ZNsn5bhgIIao8=
k8s.io/apimachinery v0.28.4/go.mod h1:wI37ncBvfAoswfq626yPTe6Bz1c22L7uaJ8dho83mgg=
k8s.io/client-go v0.28.4 h1:Np5ocjlZcTrkyRJ3+T3PkXDpe4UpatQxj85+xjaD2wY=
k8s.io/client-go v0.28.4/go.mod h1:0VDZFpgoZfelyP5Wqu0/r/TRYcLYuJ2U1KEeoaPa1N4=
k8s.io/apimachinery v0.30.0 h1:qxVPsyDM5XS96NIh9Oj6LavoVFYff/Pon9cZeDIkHHA=
k8s.io/apimachinery v0.30.0/go.mod h1:iexa2somDaxdnj7bha06bhb43Zpa6eWH8N8dbqVjTUc=
k8s.io/client-go v0.30.0 h1:sB1AGGlhY/o7KCyCEQ0bPWzYDL0pwOZO4vAtTSh/gJQ=
k8s.io/client-go v0.30.0/go.mod h1:g7li5O5256qe6TYdAMyX/otJqMhIiGgTapdLchhmOaY=
k8s.io/component-base v0.28.4 h1:c/iQLWPdUgI90O+T9TeECg8o7N3YJTiuz2sKxILYcYo=
k8s.io/component-base v0.28.4/go.mod h1:m9hR0uvqXDybiGL2nf/3Lf0MerAfQXzkfWhUY58JUbU=
k8s.io/klog/v2 v2.120.1 h1:QXU6cPEOIslTGvZaXvFWiP9VKyeet3sawzTOvdXb4Vw=
k8s.io/klog/v2 v2.120.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE=
k8s.io/kube-openapi v0.0.0-20240220201932-37d671a357a5 h1:QSpdNrZ9uRlV0VkqLvVO0Rqg8ioKi3oSw7O5P7pJV8M=
k8s.io/kube-openapi v0.0.0-20240220201932-37d671a357a5/go.mod h1:Pa1PvrP7ACSkuX6I7KYomY6cmMA0Tx86waBhDUgoKPw=
k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 h1:BZqlfIlq5YbRMFko6/PM7FjZpUb45WallggurYhKGag=
k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340/go.mod h1:yD4MZYeKMBwQKVht279WycxKyM84kkAx2DPrTXaeb98=
k8s.io/kubelet v0.28.4 h1:Ypxy1jaFlSXFXbg/yVtFOU2ZxErBVRJfLu8+t4s7Dtw=
k8s.io/kubelet v0.28.4/go.mod h1:w1wPI12liY/aeC70nqKYcNNkr6/nbyvdMB7P7wmww2o=
k8s.io/utils v0.0.0-20240502163921-fe8a2dddb1d0 h1:jgGTlFYnhF1PM1Ax/lAlxUPE+KfCIXHaathvJg1C3ak=
Expand Down
26 changes: 0 additions & 26 deletions providers/k8s/resources/k8s.lr
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@ k8s {
roles() []k8s.rbac.role
// Kubernetes RBAC RoleBindings
rolebindings() []k8s.rbac.rolebinding
// Kubernetes PodSecurityPolicies
podSecurityPolicies() []k8s.podsecuritypolicy
// Kubernetes network policies
networkPolicies() []k8s.networkpolicy
// Kubernetes custom resources
Expand Down Expand Up @@ -751,30 +749,6 @@ private k8s.rbac.rolebinding @defaults("name namespace created") {
roleRef dict
}

// Kubernetes PodSecurityPolicy (deprecated as of Kubernetes v1.21)
private k8s.podsecuritypolicy {
// Mondoo ID for the Kubernetes object
id string
// Kubernetes object UID
uid string
// Kubernetes resource version
resourceVersion string
// Kubernetes labels
labels() map[string]string
// Kubernetes annotations
annotations() map[string]string
// Kubernetes object name
name string
// Kubernetes object type
kind string
// Kubernetes object creation timestamp
created time
// Full resource manifest
manifest() dict
// Policy Spec
spec() dict
}

// Kubernetes Network Policy
private k8s.networkpolicy @defaults("namespace name created") {
// Mondoo ID for the Kubernetes object
Expand Down
204 changes: 0 additions & 204 deletions providers/k8s/resources/k8s.lr.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 6e14993

Please sign in to comment.