mirror of
https://github.com/FairwindsOps/polaris.git
synced 2026-08-23 22:26:34 +00:00
Compare commits
11
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dafa0b74fc | ||
|
|
f0a370c757 | ||
|
|
cb741e3eb1 | ||
|
|
b65142e8be | ||
|
|
31bc0fdb84 | ||
|
|
292a1c257c | ||
|
|
06ef2d3f70 | ||
|
|
4bdf5315b6 | ||
|
|
278cb9008c | ||
|
|
d6858e0fe4 | ||
|
|
78fe4cb11c |
+5
-24
@@ -1,7 +1,7 @@
|
||||
version: 2.1
|
||||
|
||||
orbs:
|
||||
rok8s: fairwinds/rok8s-scripts@14
|
||||
rok8s: fairwinds/rok8s-scripts@16.0.0
|
||||
oss-docs: fairwinds/oss-docs@0
|
||||
|
||||
executors:
|
||||
@@ -141,7 +141,7 @@ jobs:
|
||||
|
||||
test:
|
||||
docker:
|
||||
- image: cimg/go:1.26.2
|
||||
- image: cimg/go:1.26.5
|
||||
steps:
|
||||
- checkout
|
||||
- *set_environment_variables
|
||||
@@ -157,7 +157,7 @@ jobs:
|
||||
# The goreleaser image tag determins the version of Go.
|
||||
# Manually check goreleaser images for their version of Go.
|
||||
# Ref: https://hub.docker.com/r/goreleaser/goreleaser/tags
|
||||
- image: goreleaser/goreleaser:v2.15.4
|
||||
- image: goreleaser/goreleaser:v2.17.1
|
||||
steps:
|
||||
- checkout
|
||||
- setup_remote_docker
|
||||
@@ -211,27 +211,8 @@ jobs:
|
||||
name: Tag and save amd64 image for Kind
|
||||
command: |
|
||||
set -euo pipefail
|
||||
AMD64_IMAGE="us-docker.pkg.dev/fairwinds-ops/oss/polaris:${CIRCLE_SHA1}-amd64"
|
||||
KIND_IMAGE="us-docker.pkg.dev/fairwinds-ops/oss/polaris:${CIRCLE_SHA1}"
|
||||
|
||||
if docker image inspect "${AMD64_IMAGE}" >/dev/null 2>&1; then
|
||||
docker tag "${AMD64_IMAGE}" "${KIND_IMAGE}"
|
||||
elif docker image inspect "${KIND_IMAGE}" >/dev/null 2>&1; then
|
||||
echo "Using existing ${KIND_IMAGE}"
|
||||
else
|
||||
echo "Goreleaser buildx did not load ${AMD64_IMAGE}; building ${KIND_IMAGE} from dist/"
|
||||
POLARIS_BIN="$(find dist -type f -name polaris -path '*linux_amd64*' | head -1)"
|
||||
if [ -z "${POLARIS_BIN}" ]; then
|
||||
echo "Could not find linux amd64 binary in dist/"
|
||||
find dist -type f || true
|
||||
docker images | grep -E 'polaris|REPOSITORY' || true
|
||||
exit 1
|
||||
fi
|
||||
cp "${POLARIS_BIN}" ./polaris
|
||||
docker build --platform linux/amd64 -t "${KIND_IMAGE}" .
|
||||
fi
|
||||
|
||||
docker save "${KIND_IMAGE}" -o "/tmp/workspace/docker_save/polaris_${CIRCLE_SHA1}.tar"
|
||||
docker tag "us-docker.pkg.dev/fairwinds-ops/oss/polaris:${CIRCLE_SHA1}-amd64" "us-docker.pkg.dev/fairwinds-ops/oss/polaris:${CIRCLE_SHA1}"
|
||||
docker save "us-docker.pkg.dev/fairwinds-ops/oss/polaris:${CIRCLE_SHA1}" -o "/tmp/workspace/docker_save/polaris_${CIRCLE_SHA1}.tar"
|
||||
- persist_to_workspace:
|
||||
root: /tmp/workspace
|
||||
paths:
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# The action uses an own Dockerfile on purpose because the root Dockerfile takes way too long to build for an action
|
||||
|
||||
FROM alpine:3.23
|
||||
FROM alpine:3.24
|
||||
|
||||
RUN apk add --no-cache \
|
||||
bash \
|
||||
|
||||
@@ -84,7 +84,6 @@ dockers:
|
||||
dockerfile: Dockerfile
|
||||
build_flag_templates:
|
||||
- "--platform=linux/amd64"
|
||||
- "{{ if .IsSnapshot }}--load{{ end }}"
|
||||
- image_templates:
|
||||
- "us-docker.pkg.dev/fairwinds-ops/oss/polaris:{{ .FullCommit }}-arm64v8"
|
||||
- "us-docker.pkg.dev/fairwinds-ops/oss/polaris:{{ .Tag }}-arm64v8"
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
FROM alpine:3.23.4
|
||||
FROM alpine:3.24.1
|
||||
|
||||
LABEL org.opencontainers.image.authors="FairwindsOps, Inc." \
|
||||
org.opencontainers.image.vendor="FairwindsOps, Inc." \
|
||||
|
||||
@@ -15,10 +15,10 @@ require (
|
||||
github.com/thoas/go-funk v0.9.3
|
||||
gomodules.xyz/jsonpatch/v2 v2.5.0
|
||||
gopkg.in/yaml.v3 v3.0.1
|
||||
k8s.io/api v0.35.4
|
||||
k8s.io/apimachinery v0.36.1
|
||||
k8s.io/client-go v0.35.4
|
||||
sigs.k8s.io/controller-runtime v0.23.3
|
||||
k8s.io/api v0.36.3
|
||||
k8s.io/apimachinery v0.36.3
|
||||
k8s.io/client-go v0.36.3
|
||||
sigs.k8s.io/controller-runtime v0.24.1
|
||||
sigs.k8s.io/yaml v1.6.0
|
||||
)
|
||||
|
||||
@@ -67,20 +67,20 @@ require (
|
||||
github.com/x448/float16 v0.8.4 // indirect
|
||||
go.yaml.in/yaml/v2 v2.4.4 // indirect
|
||||
go.yaml.in/yaml/v3 v3.0.4 // indirect
|
||||
golang.org/x/net v0.51.0 // indirect
|
||||
golang.org/x/net v0.55.0 // indirect
|
||||
golang.org/x/oauth2 v0.36.0 // indirect
|
||||
golang.org/x/sys v0.42.0 // indirect
|
||||
golang.org/x/term v0.40.0 // indirect
|
||||
golang.org/x/text v0.34.0 // indirect
|
||||
golang.org/x/sys v0.45.0 // indirect
|
||||
golang.org/x/term v0.43.0 // indirect
|
||||
golang.org/x/text v0.37.0 // indirect
|
||||
golang.org/x/time v0.15.0 // indirect
|
||||
google.golang.org/protobuf v1.36.12-0.20260120151049-f2248ac996af // indirect
|
||||
gopkg.in/evanphx/json-patch.v4 v4.13.0 // indirect
|
||||
gopkg.in/inf.v0 v0.9.1 // indirect
|
||||
k8s.io/apiextensions-apiserver v0.35.4 // indirect
|
||||
k8s.io/apiextensions-apiserver v0.36.0 // indirect
|
||||
k8s.io/klog/v2 v2.140.0 // indirect
|
||||
k8s.io/kube-openapi v0.0.0-20260317180543-43fb72c5454a // indirect
|
||||
k8s.io/utils v0.0.0-20260210185600-b8788abfbbc2 // indirect
|
||||
sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 // indirect
|
||||
sigs.k8s.io/randfill v1.0.0 // indirect
|
||||
sigs.k8s.io/structured-merge-diff/v6 v6.3.2 // indirect
|
||||
sigs.k8s.io/structured-merge-diff/v6 v6.3.3 // indirect
|
||||
)
|
||||
|
||||
@@ -67,8 +67,6 @@ github.com/go-openapi/testify/v2 v2.4.0 h1:8nsPrHVCWkQ4p8h1EsRVymA2XABB4OT40gcvA
|
||||
github.com/go-openapi/testify/v2 v2.4.0/go.mod h1:HCPmvFFnheKK2BuwSA0TbbdxJ3I16pjwMkYkP4Ywn54=
|
||||
github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI=
|
||||
github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8=
|
||||
github.com/google/btree v1.1.3 h1:CVpQJjYgC4VbzxeGVHfvZrv1ctoYCAI8vbl07Fcxlyg=
|
||||
github.com/google/btree v1.1.3/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4=
|
||||
github.com/google/gnostic-models v0.7.1 h1:SisTfuFKJSKM5CPZkffwi6coztzzeYUhc3v4yxLWH8c=
|
||||
github.com/google/gnostic-models v0.7.1/go.mod h1:whL5G0m6dmc5cPxKc5bdKdEN3UjI7OUGxBlw57miDrQ=
|
||||
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
|
||||
@@ -106,10 +104,10 @@ github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee h1:W5t00kpgFd
|
||||
github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
|
||||
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA=
|
||||
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
|
||||
github.com/onsi/ginkgo/v2 v2.27.2 h1:LzwLj0b89qtIy6SSASkzlNvX6WktqurSHwkk2ipF/Ns=
|
||||
github.com/onsi/ginkgo/v2 v2.27.2/go.mod h1:ArE1D/XhNXBXCBkKOLkbsb2c81dQHCRcF5zwn/ykDRo=
|
||||
github.com/onsi/gomega v1.38.2 h1:eZCjf2xjZAqe+LeWvKb5weQ+NcPwX84kqJ0cZNxok2A=
|
||||
github.com/onsi/gomega v1.38.2/go.mod h1:W2MJcYxRGV63b418Ai34Ud0hEdTVXq9NW9+Sx6uXf3k=
|
||||
github.com/onsi/ginkgo/v2 v2.27.4 h1:fcEcQW/A++6aZAZQNUmNjvA9PSOzefMJBerHJ4t8v8Y=
|
||||
github.com/onsi/ginkgo/v2 v2.27.4/go.mod h1:ArE1D/XhNXBXCBkKOLkbsb2c81dQHCRcF5zwn/ykDRo=
|
||||
github.com/onsi/gomega v1.39.0 h1:y2ROC3hKFmQZJNFeGAMeHZKkjBL65mIZcvrLQBF9k6Q=
|
||||
github.com/onsi/gomega v1.39.0/go.mod h1:ZCU1pkQcXDO5Sl9/VVEGlDyp+zm0m1cmeG5TOzLgdh4=
|
||||
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
|
||||
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
@@ -156,31 +154,31 @@ go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
|
||||
go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
|
||||
go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0=
|
||||
go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y=
|
||||
go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8=
|
||||
go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E=
|
||||
go.uber.org/zap v1.27.1 h1:08RqriUEv8+ArZRYSTXy1LeBScaMpVSTBhCeaZYfMYc=
|
||||
go.uber.org/zap v1.27.1/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E=
|
||||
go.yaml.in/yaml/v2 v2.4.4 h1:tuyd0P+2Ont/d6e2rl3be67goVK4R6deVxCUX5vyPaQ=
|
||||
go.yaml.in/yaml/v2 v2.4.4/go.mod h1:gMZqIpDtDqOfM0uNfy0SkpRhvUryYH0Z6wdMYcacYXQ=
|
||||
go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc=
|
||||
go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg=
|
||||
golang.org/x/mod v0.32.0 h1:9F4d3PHLljb6x//jOyokMv3eX+YDeepZSEo3mFJy93c=
|
||||
golang.org/x/mod v0.32.0/go.mod h1:SgipZ/3h2Ci89DlEtEXWUk/HteuRin+HHhN+WbNhguU=
|
||||
golang.org/x/net v0.51.0 h1:94R/GTO7mt3/4wIKpcR5gkGmRLOuE/2hNGeWq/GBIFo=
|
||||
golang.org/x/net v0.51.0/go.mod h1:aamm+2QF5ogm02fjy5Bb7CQ0WMt1/WVM7FtyaTLlA9Y=
|
||||
golang.org/x/mod v0.35.0 h1:Ww1D637e6Pg+Zb2KrWfHQUnH2dQRLBQyAtpr/haaJeM=
|
||||
golang.org/x/mod v0.35.0/go.mod h1:+GwiRhIInF8wPm+4AoT6L0FA1QWAad3OMdTRx4tFYlU=
|
||||
golang.org/x/net v0.55.0 h1:bcvxaJn3e1U6InsFWt1JUq1aSjnRxLzT2rtD2KfkDF8=
|
||||
golang.org/x/net v0.55.0/go.mod h1:L5U2KuzuOe1lY7Z+aWVIKK6qEeJXnXV9yzGA+WCHJww=
|
||||
golang.org/x/oauth2 v0.36.0 h1:peZ/1z27fi9hUOFCAZaHyrpWG5lwe0RJEEEeH0ThlIs=
|
||||
golang.org/x/oauth2 v0.36.0/go.mod h1:YDBUJMTkDnJS+A4BP4eZBjCqtokkg1hODuPjwiGPO7Q=
|
||||
golang.org/x/sync v0.19.0 h1:vV+1eWNmZ5geRlYjzm2adRgW2/mcpevXNg50YZtPCE4=
|
||||
golang.org/x/sync v0.19.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI=
|
||||
golang.org/x/sync v0.20.0 h1:e0PTpb7pjO8GAtTs2dQ6jYa5BWYlMuX047Dco/pItO4=
|
||||
golang.org/x/sync v0.20.0/go.mod h1:9xrNwdLfx4jkKbNva9FpL6vEN7evnE43NNNJQ2LF3+0=
|
||||
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.42.0 h1:omrd2nAlyT5ESRdCLYdm3+fMfNFE/+Rf4bDIQImRJeo=
|
||||
golang.org/x/sys v0.42.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw=
|
||||
golang.org/x/term v0.40.0 h1:36e4zGLqU4yhjlmxEaagx2KuYbJq3EwY8K943ZsHcvg=
|
||||
golang.org/x/term v0.40.0/go.mod h1:w2P8uVp06p2iyKKuvXIm7N/y0UCRt3UfJTfZ7oOpglM=
|
||||
golang.org/x/text v0.34.0 h1:oL/Qq0Kdaqxa1KbNeMKwQq0reLCCaFtqu2eNuSeNHbk=
|
||||
golang.org/x/text v0.34.0/go.mod h1:homfLqTYRFyVYemLBFl5GgL/DWEiH5wcsQ5gSh1yziA=
|
||||
golang.org/x/sys v0.45.0 h1:dO4czNzziLiiXplLQgBCEpCvXQ3dnkn0SdaZSYdQ+FY=
|
||||
golang.org/x/sys v0.45.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw=
|
||||
golang.org/x/term v0.43.0 h1:S4RLU2sB31O/NCl+zFN9Aru9A/Cq2aqKpTZJ6B+DwT4=
|
||||
golang.org/x/term v0.43.0/go.mod h1:lrhlHNdQJHO+1qVYiHfFKVuVioJIheAc3fBSMFYEIsk=
|
||||
golang.org/x/text v0.37.0 h1:Cqjiwd9eSg8e0QAkyCaQTNHFIIzWtidPahFWR83rTrc=
|
||||
golang.org/x/text v0.37.0/go.mod h1:a5sjxXGs9hsn/AJVwuElvCAo9v8QYLzvavO5z2PiM38=
|
||||
golang.org/x/time v0.15.0 h1:bbrp8t3bGUeFOx08pvsMYRTCVSMk89u4tKbNOZbp88U=
|
||||
golang.org/x/time v0.15.0/go.mod h1:Y4YMaQmXwGQZoFaVFk4YpCt4FLQMYKZe9oeV/f4MSno=
|
||||
golang.org/x/tools v0.41.0 h1:a9b8iMweWG+S0OBnlU36rzLp20z1Rp10w+IY2czHTQc=
|
||||
golang.org/x/tools v0.41.0/go.mod h1:XSY6eDqxVNiYgezAVqqCeihT4j1U2CCsqvH3WhQpnlg=
|
||||
golang.org/x/tools v0.44.0 h1:UP4ajHPIcuMjT1GqzDWRlalUEoY+uzoZKnhOjbIPD2c=
|
||||
golang.org/x/tools v0.44.0/go.mod h1:KA0AfVErSdxRZIsOVipbv3rQhVXTnlU6UhKxHd1seDI=
|
||||
gomodules.xyz/jsonpatch/v2 v2.5.0 h1:JELs8RLM12qJGXU4u/TO3V25KW8GreMKl9pdkk14RM0=
|
||||
gomodules.xyz/jsonpatch/v2 v2.5.0/go.mod h1:AH3dM2RI6uoBZxn3LVrfvJ3E0/9dG4cSrbuBJT4moAY=
|
||||
google.golang.org/protobuf v1.36.12-0.20260120151049-f2248ac996af h1:+5/Sw3GsDNlEmu7TfklWKPdQ0Ykja5VEmq2i817+jbI=
|
||||
@@ -195,27 +193,27 @@ gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw=
|
||||
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
||||
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
k8s.io/api v0.35.4 h1:P7nFYKl5vo9AGUp1Z+Pmd3p2tA7bX2wbFWCvDeRv988=
|
||||
k8s.io/api v0.35.4/go.mod h1:yl4lqySWOgYJJf9RERXKUwE9g2y+CkuwG+xmcOK8wXU=
|
||||
k8s.io/apiextensions-apiserver v0.35.4 h1:HeP+Upp7ItdvnyGmub0yoix+2z5+ev4M5cE5TCgtOUU=
|
||||
k8s.io/apiextensions-apiserver v0.35.4/go.mod h1:ogQlk+stIE8mnoRthSYCwlOS12fVqgWFiErMwPaXA7c=
|
||||
k8s.io/apimachinery v0.36.1 h1:G63Gjx2W+q0YD+72Vo8oY0nDnePVwnuzTmmy5ENrVSA=
|
||||
k8s.io/apimachinery v0.36.1/go.mod h1:ibYOR00vW/I1kzvi5SF0dRuJ52BvKtfvRdOn35GPQ+8=
|
||||
k8s.io/client-go v0.35.4 h1:DN6fyaGuzK64UvnKO5fOA6ymSjvfGAnCAHAR0C66kD8=
|
||||
k8s.io/client-go v0.35.4/go.mod h1:2Pg9WpsS4NeOpoYTfHHfMxBG8zFMSAUi4O/qoiJC3nY=
|
||||
k8s.io/api v0.36.3 h1:NxB+05W2UGqXWFXcLO0RB5cnqnUPP5v5sVlaOH0Iz4w=
|
||||
k8s.io/api v0.36.3/go.mod h1:JzLQKqRHC5+I8RVj/lS3lCg0mg6nWI9Fo/Sk3ElxHzg=
|
||||
k8s.io/apiextensions-apiserver v0.36.0 h1:Wt7E8J+VBCbj4FjiBfDTK/neXDDjyJVJc7xfuOHImZ0=
|
||||
k8s.io/apiextensions-apiserver v0.36.0/go.mod h1:kGDjH0msuiIB3tgsYRV0kS9GqpMYMUsQ3GHv7TApyug=
|
||||
k8s.io/apimachinery v0.36.3 h1:PkzMRBRG8joFD8EhCuQAtNPvJlxb82FwplP26HIzvAM=
|
||||
k8s.io/apimachinery v0.36.3/go.mod h1:cTSjBWgPe/6CQyBKzY/hDIRWCQQQeK0mfLbml0UYFHE=
|
||||
k8s.io/client-go v0.36.3 h1:M4JdVzXxYcZk4fGpfDdYnxSwhLKWCFoQsHW6t+z8Hfg=
|
||||
k8s.io/client-go v0.36.3/go.mod h1:gcPwr0c87vjjG6HB6pWEqOeuYVoXSsREjzux2j6GF30=
|
||||
k8s.io/klog/v2 v2.140.0 h1:Tf+J3AH7xnUzZyVVXhTgGhEKnFqye14aadWv7bzXdzc=
|
||||
k8s.io/klog/v2 v2.140.0/go.mod h1:o+/RWfJ6PwpnFn7OyAG3QnO47BFsymfEfrz6XyYSSp0=
|
||||
k8s.io/kube-openapi v0.0.0-20260317180543-43fb72c5454a h1:xCeOEAOoGYl2jnJoHkC3hkbPJgdATINPMAxaynU2Ovg=
|
||||
k8s.io/kube-openapi v0.0.0-20260317180543-43fb72c5454a/go.mod h1:uGBT7iTA6c6MvqUvSXIaYZo9ukscABYi2btjhvgKGZ0=
|
||||
k8s.io/utils v0.0.0-20260210185600-b8788abfbbc2 h1:AZYQSJemyQB5eRxqcPky+/7EdBj0xi3g0ZcxxJ7vbWU=
|
||||
k8s.io/utils v0.0.0-20260210185600-b8788abfbbc2/go.mod h1:xDxuJ0whA3d0I4mf/C4ppKHxXynQ+fxnkmQH0vTHnuk=
|
||||
sigs.k8s.io/controller-runtime v0.23.3 h1:VjB/vhoPoA9l1kEKZHBMnQF33tdCLQKJtydy4iqwZ80=
|
||||
sigs.k8s.io/controller-runtime v0.23.3/go.mod h1:B6COOxKptp+YaUT5q4l6LqUJTRpizbgf9KSRNdQGns0=
|
||||
sigs.k8s.io/controller-runtime v0.24.1 h1:miPEwrmirImAvgME1L9qebGHrOnGJoVmVdtOU9fRfo4=
|
||||
sigs.k8s.io/controller-runtime v0.24.1/go.mod h1:vFkfY5fGt5xAC/sKb8IBFKgWPNKG9OUG29dR8Y2wImw=
|
||||
sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 h1:IpInykpT6ceI+QxKBbEflcR5EXP7sU1kvOlxwZh5txg=
|
||||
sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730/go.mod h1:mdzfpAEoE6DHQEN0uh9ZbOCuHbLK5wOm7dK4ctXE9Tg=
|
||||
sigs.k8s.io/randfill v1.0.0 h1:JfjMILfT8A6RbawdsK2JXGBR5AQVfd+9TbzrlneTyrU=
|
||||
sigs.k8s.io/randfill v1.0.0/go.mod h1:XeLlZ/jmk4i1HRopwe7/aU3H5n1zNUcX6TM94b3QxOY=
|
||||
sigs.k8s.io/structured-merge-diff/v6 v6.3.2 h1:kwVWMx5yS1CrnFWA/2QHyRVJ8jM6dBA80uLmm0wJkk8=
|
||||
sigs.k8s.io/structured-merge-diff/v6 v6.3.2/go.mod h1:M3W8sfWvn2HhQDIbGWj3S099YozAsymCo/wrT5ohRUE=
|
||||
sigs.k8s.io/structured-merge-diff/v6 v6.3.3 h1:u08YRbVUi59ri4YD6cg0UqNM4Dimn0sIl+wldcx5PYw=
|
||||
sigs.k8s.io/structured-merge-diff/v6 v6.3.3/go.mod h1:M3W8sfWvn2HhQDIbGWj3S099YozAsymCo/wrT5ohRUE=
|
||||
sigs.k8s.io/yaml v1.6.0 h1:G8fkbMSAFqgEFgh4b1wmtzDnioxFCUgTZhlbj5P9QYs=
|
||||
sigs.k8s.io/yaml v1.6.0/go.mod h1:796bPqUfzR/0jLAl6XjHl3Ck7MiyVv8dbTdyT3/pMf4=
|
||||
|
||||
@@ -52,6 +52,7 @@ type ResourceProvider struct {
|
||||
SourceType string
|
||||
Nodes []corev1.Node
|
||||
Namespaces []corev1.Namespace
|
||||
Pods []corev1.Pod
|
||||
Resources resourceKindMap
|
||||
}
|
||||
|
||||
@@ -127,6 +128,7 @@ func newResourceProvider(version, sourceType, sourceName string) ResourceProvide
|
||||
CreationTime: time.Now(),
|
||||
Nodes: make([]corev1.Node, 0),
|
||||
Namespaces: make([]corev1.Namespace, 0),
|
||||
Pods: make([]corev1.Pod, 0),
|
||||
Resources: make(map[string][]GenericResource),
|
||||
}
|
||||
}
|
||||
@@ -304,6 +306,14 @@ func CreateResourceProviderFromAPI(ctx context.Context, kube kubernetes.Interfac
|
||||
}
|
||||
namespaces = nsList
|
||||
}
|
||||
|
||||
logrus.Info("Loading pods")
|
||||
pods, err := kube.CoreV1().Pods(c.Namespace).List(ctx, listOpts)
|
||||
if err != nil {
|
||||
logrus.Errorf("Error fetching Pods: %v", err)
|
||||
return nil, err
|
||||
}
|
||||
|
||||
logrus.Info("Setting up restmapper")
|
||||
resources, err := restmapper.GetAPIGroupResources(kube.Discovery())
|
||||
if err != nil {
|
||||
@@ -383,6 +393,7 @@ func CreateResourceProviderFromAPI(ctx context.Context, kube kubernetes.Interfac
|
||||
|
||||
provider.Nodes = nodes.Items
|
||||
provider.Namespaces = namespaces.Items
|
||||
provider.Pods = pods.Items
|
||||
provider.Resources.addResources(kubernetesResources)
|
||||
logrus.Info("Done loading Kubernetes resources")
|
||||
return &provider, nil
|
||||
@@ -442,6 +453,7 @@ func (resources *ResourceProvider) addResourceFromString(contents string) error
|
||||
return err
|
||||
}
|
||||
workload.OriginalObjectYAML = contentBytes
|
||||
resources.Pods = append(resources.Pods, pod)
|
||||
resources.Resources.addResource(workload)
|
||||
} else {
|
||||
newResource, err := NewGenericResourceFromBytes(contentBytes)
|
||||
|
||||
@@ -157,6 +157,7 @@ func TestGetResourceFromAPI(t *testing.T) {
|
||||
assert.Equal(t, tt.want.SourceName, resources.SourceName)
|
||||
assert.IsType(t, tt.want.CreationTime, resources.CreationTime)
|
||||
assert.Equal(t, 0, len(resources.Nodes), "Should not have any nodes")
|
||||
assert.Equal(t, 5, len(resources.Pods), "Should have 5 pods")
|
||||
for k, v := range resources.Resources {
|
||||
fmt.Println("cont", k, v)
|
||||
}
|
||||
|
||||
@@ -50,6 +50,7 @@ func RunAudit(ctx context.Context, config conf.Configuration, kubeResources *kub
|
||||
ClusterInfo: ClusterInfo{
|
||||
Version: kubeResources.ServerVersion,
|
||||
Nodes: len(kubeResources.Nodes),
|
||||
Pods: len(kubeResources.Pods),
|
||||
Namespaces: len(kubeResources.Namespaces),
|
||||
Controllers: kubeResources.Resources.GetNumberOfControllers(),
|
||||
},
|
||||
|
||||
@@ -51,6 +51,9 @@ func TestGetTemplateData(t *testing.T) {
|
||||
assert.EqualValues(t, sum, actualAudit.GetSummary())
|
||||
assert.Equal(t, actualAudit.SourceType, "Cluster", "should be from a cluster")
|
||||
assert.Equal(t, actualAudit.SourceName, "test", "should be from a cluster")
|
||||
assert.Equal(t, 5, actualAudit.ClusterInfo.Pods, "should report pod count from the cluster")
|
||||
assert.Equal(t, 5, actualAudit.ClusterInfo.Controllers, "should report controller count from the cluster")
|
||||
assert.Equal(t, 1, actualAudit.ClusterInfo.Namespaces, "should report namespace count from the cluster")
|
||||
|
||||
expectedResults := []struct {
|
||||
kind string
|
||||
|
||||
+57
-120
@@ -1,3 +1,4 @@
|
||||
// DO NOT EDIT - Managed by Terraform
|
||||
{
|
||||
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
||||
"extends": [
|
||||
@@ -5,10 +6,63 @@
|
||||
":dependencyDashboard"
|
||||
],
|
||||
"labels": ["dependencies"],
|
||||
"assignees": ["jdesouza", "vitorvezani"],
|
||||
"prConcurrentLimit": 10,
|
||||
"branchConcurrentLimit": 10,
|
||||
"enabledManagers": ["gomod", "dockerfile", "circleci", "custom.regex"],
|
||||
"minimumReleaseAge": "7 days",
|
||||
"enabledManagers": [
|
||||
"gomod",
|
||||
"dockerfile",
|
||||
"circleci",
|
||||
"custom.regex"
|
||||
],
|
||||
"postUpdateOptions": ["gomodTidy", "gomodUpdateImportPaths"],
|
||||
"customManagers": [
|
||||
{
|
||||
"description": "HashiCorp Vault download URL in CircleCI",
|
||||
"customType": "regex",
|
||||
"managerFilePatterns": ["/(^|/)\\.circleci/config\\.yml$/"],
|
||||
"matchStrings": [
|
||||
"https://releases\\.hashicorp\\.com/vault/(?<currentValue>[\\d.]+)/vault_[\\d.]+_linux_amd64\\.zip"
|
||||
],
|
||||
"depNameTemplate": "hashicorp/vault",
|
||||
"datasourceTemplate": "hashicorp-releases",
|
||||
"autoReplaceStringTemplate": "https://releases.hashicorp.com/vault/{{{newValue}}}/vault_{{{newValue}}}_linux_amd64.zip"
|
||||
},
|
||||
{
|
||||
"description": "HashiCorp Vault archive name in CircleCI (sha256 line must be updated manually)",
|
||||
"customType": "regex",
|
||||
"managerFilePatterns": ["/(^|/)\\.circleci/config\\.yml$/"],
|
||||
"matchStrings": [
|
||||
"vault_(?<currentValue>[\\d.]+)_linux_amd64\\.zip"
|
||||
],
|
||||
"depNameTemplate": "hashicorp/vault",
|
||||
"datasourceTemplate": "hashicorp-releases",
|
||||
"autoReplaceStringTemplate": "vault_{{{newValue}}}_linux_amd64.zip"
|
||||
},
|
||||
{
|
||||
"description": "golangci-lint install.sh pin in CircleCI",
|
||||
"customType": "regex",
|
||||
"managerFilePatterns": ["/(^|/)\\.circleci/config\\.yml$/"],
|
||||
"matchStrings": [
|
||||
"golangci/golangci-lint/HEAD/install.sh \\| sh -s -- -b /usr/local/bin v(?<currentValue>[0-9.]+)"
|
||||
],
|
||||
"depNameTemplate": "golangci/golangci-lint",
|
||||
"datasourceTemplate": "github-releases",
|
||||
"extractVersionTemplate": "^v?(?<version>.*)$",
|
||||
"autoReplaceStringTemplate": "golangci/golangci-lint/HEAD/install.sh | sh -s -- -b /usr/local/bin v{{{newValue}}}"
|
||||
},
|
||||
{
|
||||
"description": "Kind node image for rok8s-scripts kubernetes_e2e_tests",
|
||||
"customType": "regex",
|
||||
"managerFilePatterns": ["/(^|/)\\.circleci/config\\.yml$/"],
|
||||
"matchStrings": [
|
||||
"kind_node_image:\\s*\"kindest/node:(?<currentValue>v[^\"\\s]+)\""
|
||||
],
|
||||
"depNameTemplate": "kindest/node",
|
||||
"datasourceTemplate": "docker",
|
||||
"autoReplaceStringTemplate": "kind_node_image: \"kindest/node:{{{newValue}}}\""
|
||||
}
|
||||
],
|
||||
"packageRules": [
|
||||
{
|
||||
"description": "Group all non-major (minor + patch) updates into a single PR",
|
||||
@@ -29,132 +83,15 @@
|
||||
"enabled": false
|
||||
},
|
||||
{
|
||||
"description": "Every upgrade: upstream release must be at least 7 days old (applies to all enabled managers)",
|
||||
"description": "Every upgrade: upstream release must be at least 7 days old",
|
||||
"matchManagers": ["gomod", "dockerfile", "circleci", "custom.regex"],
|
||||
"minimumReleaseAge": "7 days"
|
||||
},
|
||||
{
|
||||
"description": "Keep GoReleaser image in sync across CircleCI executor and docker run",
|
||||
"groupName": "GoReleaser",
|
||||
"matchManagers": ["circleci", "custom.regex"],
|
||||
"matchDepNames": ["goreleaser/goreleaser"]
|
||||
},
|
||||
{
|
||||
"description": "Keep CircleCI cimg/go aligned with go.mod",
|
||||
"groupName": "Go toolchain",
|
||||
"matchManagers": ["circleci", "gomod"],
|
||||
"matchDepNames": ["go", "cimg/go"]
|
||||
},
|
||||
{
|
||||
"description": "Group HashiCorp Vault version bumps (sha256 checksum still needs manual update)",
|
||||
"groupName": "HashiCorp Vault",
|
||||
"matchManagers": ["custom.regex"],
|
||||
"matchDepNames": ["hashicorp/vault"]
|
||||
},
|
||||
{
|
||||
"description": "Group K8s integration test tooling in CircleCI install_k8s",
|
||||
"groupName": "K8s e2e test tooling",
|
||||
"matchManagers": ["custom.regex"],
|
||||
"matchDepNames": [
|
||||
"kubernetes-sigs/kind",
|
||||
"kubernetes/kubernetes",
|
||||
"kindest/node",
|
||||
"cert-manager/cert-manager"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "jsonpatch/v2 must stay; controller-runtime admission.Patched() uses v2 types",
|
||||
"matchManagers": ["gomod"],
|
||||
"matchPackageNames": ["gomodules.xyz/jsonpatch/v2"],
|
||||
"matchUpdateTypes": ["major"],
|
||||
"enabled": false
|
||||
}
|
||||
],
|
||||
"minimumReleaseAge": "7 days",
|
||||
"gomod": {
|
||||
"enabled": true
|
||||
},
|
||||
"postUpdateOptions": ["gomodTidy", "gomodUpdateImportPaths"],
|
||||
"customManagers": [
|
||||
{
|
||||
"description": "GoReleaser image in CircleCI executor and docker run commands",
|
||||
"customType": "regex",
|
||||
"managerFilePatterns": ["/(^|/)\\.circleci/config\\.yml$/"],
|
||||
"matchStrings": [
|
||||
"goreleaser/goreleaser:v(?<currentValue>[0-9.]+)"
|
||||
],
|
||||
"depNameTemplate": "goreleaser/goreleaser",
|
||||
"datasourceTemplate": "docker",
|
||||
"autoReplaceStringTemplate": "goreleaser/goreleaser:v{{{newValue}}}"
|
||||
},
|
||||
{
|
||||
"description": "HashiCorp Vault download URL in CircleCI install_vault_alpine",
|
||||
"customType": "regex",
|
||||
"managerFilePatterns": ["/(^|/)\\.circleci/config\\.yml$/"],
|
||||
"matchStrings": [
|
||||
"https://releases\\.hashicorp\\.com/vault/(?<currentValue>[\\d.]+)/vault_[\\d.]+_linux_amd64\\.zip"
|
||||
],
|
||||
"depNameTemplate": "hashicorp/vault",
|
||||
"datasourceTemplate": "hashicorp-releases",
|
||||
"autoReplaceStringTemplate": "https://releases.hashicorp.com/vault/{{{newValue}}}/vault_{{{newValue}}}_linux_amd64.zip"
|
||||
},
|
||||
{
|
||||
"description": "HashiCorp Vault archive name in CircleCI install_vault_alpine (sha256 grep line must be updated manually)",
|
||||
"customType": "regex",
|
||||
"managerFilePatterns": ["/(^|/)\\.circleci/config\\.yml$/"],
|
||||
"matchStrings": [
|
||||
"vault_(?<currentValue>[\\d.]+)_linux_amd64\\.zip"
|
||||
],
|
||||
"depNameTemplate": "hashicorp/vault",
|
||||
"datasourceTemplate": "hashicorp-releases",
|
||||
"autoReplaceStringTemplate": "vault_{{{newValue}}}_linux_amd64.zip"
|
||||
},
|
||||
{
|
||||
"description": "kind CLI version in CircleCI install_k8s",
|
||||
"customType": "regex",
|
||||
"managerFilePatterns": ["/(^|/)\\.circleci/config\\.yml$/"],
|
||||
"matchStrings": [
|
||||
"kind/releases/download/v(?<currentValue>[0-9.]+)/kind-linux-amd64"
|
||||
],
|
||||
"depNameTemplate": "kubernetes-sigs/kind",
|
||||
"datasourceTemplate": "github-releases",
|
||||
"extractVersionTemplate": "^v?(?<version>.*)$",
|
||||
"autoReplaceStringTemplate": "kind/releases/download/v{{{newValue}}}/kind-linux-amd64"
|
||||
},
|
||||
{
|
||||
"description": "kubectl version in CircleCI install_k8s",
|
||||
"customType": "regex",
|
||||
"managerFilePatterns": ["/(^|/)\\.circleci/config\\.yml$/"],
|
||||
"matchStrings": [
|
||||
"kubernetes-release/release/v(?<currentValue>[0-9.]+)/bin/linux/amd64/kubectl"
|
||||
],
|
||||
"depNameTemplate": "kubernetes/kubernetes",
|
||||
"datasourceTemplate": "github-releases",
|
||||
"extractVersionTemplate": "^v?(?<version>.*)$",
|
||||
"autoReplaceStringTemplate": "kubernetes-release/release/v{{{newValue}}}/bin/linux/amd64/kubectl"
|
||||
},
|
||||
{
|
||||
"description": "kindest/node image in CircleCI install_k8s (sha256 digest must be updated manually)",
|
||||
"customType": "regex",
|
||||
"managerFilePatterns": ["/(^|/)\\.circleci/config\\.yml$/"],
|
||||
"matchStrings": [
|
||||
"kindest/node:(?<currentValue>v[0-9.]+)@sha256:"
|
||||
],
|
||||
"depNameTemplate": "kindest/node",
|
||||
"datasourceTemplate": "docker",
|
||||
"autoReplaceStringTemplate": "kindest/node:{{{newValue}}}@sha256:"
|
||||
},
|
||||
{
|
||||
"description": "cert-manager Helm chart version in CircleCI install_k8s",
|
||||
"customType": "regex",
|
||||
"managerFilePatterns": ["/(^|/)\\.circleci/config\\.yml$/"],
|
||||
"matchStrings": [
|
||||
"jetstack/cert-manager --namespace cert-manager --version v(?<currentValue>[0-9.]+)"
|
||||
],
|
||||
"depNameTemplate": "cert-manager/cert-manager",
|
||||
"datasourceTemplate": "github-releases",
|
||||
"extractVersionTemplate": "^v?(?<version>.*)$",
|
||||
"autoReplaceStringTemplate": "jetstack/cert-manager --namespace cert-manager --version v{{{newValue}}}"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user