Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .trivyignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,14 @@ AVD-KSV-01010
# This is part of the standard RBAC setup required for Vault k8s authn, without permission, the app wont be able to authenticate with Vault
# templates/co-manager-credentials-rbac.yaml
AVD-KSV-0113
# ConfigMap access is required for k3sdocker prerequisite cleanup
# in the ClusterTemplate delete workflow.
# This is currently broad RBAC by design to preserve existing behavior.
AVD-KSV-0049
# config/manager/manager.yaml uses controller:latest as a kustomize placeholder image.
# Every kustomize overlay replaces this via the `images:` field before deployment.
AVD-KSV-0013
# KSV-0125: Images are pulled from the org's internal trusted registry
# (registry-rs.edgeorchestration.intel.com). Trivy cannot verify registry trust
# policies at scan time; this is enforced via admission control in the cluster.
AVD-KSV-0125
12 changes: 5 additions & 7 deletions config/manager/manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,19 +52,17 @@ spec:
# - linux
securityContext:
runAsNonRoot: true
# TODO(user): For common cases that do not require escalating privileges
# it is recommended to ensure that all your Pods/Containers are restrictive.
# More info: https://kubernetes.io/docs/concepts/security/pod-security-standards/#restricted
# Please uncomment the following code if your project does NOT have to work on old Kubernetes
# versions < 1.19 or on vendors versions which do NOT support this field by default (i.e. Openshift < 4.11 ).
# seccompProfile:
# type: RuntimeDefault
runAsUser: 65532
runAsGroup: 65532
seccompProfile:
type: RuntimeDefault
containers:
- command:
- /template-controller
args:
- --leader-elect
- --health-probe-bind-address=:8081
# trivy:ignore:KSV-0013 -- kustomize placeholder image; overridden by kustomize `images:` in every overlay
image: controller:latest
name: manager
securityContext:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,17 @@ spec:
spec:
serviceAccountName: {{ .Values.serviceAccount.name | default (include "cluster-manager.serviceAccountName" .) }}
securityContext:
runAsUser: 1000
runAsNonRoot: {{ .Values.clusterManager.podSecurityContext.runAsNonRoot }}
runAsUser: {{ .Values.clusterManager.podSecurityContext.runAsUser }}
runAsGroup: {{ .Values.clusterManager.podSecurityContext.runAsGroup }}
seccompProfile:
type: {{ .Values.clusterManager.podSecurityContext.seccompProfile.type }}
initContainers:
# cluster-manager creates/updates default templates during the initialization and it requires the template-controller to be ready.
# So, ensure template controller is ready before starting cluster-manager.
- name: wait-for-template-controller
image: alpine/curl
image: "{{ .Values.curlImage.name }}:{{ .Values.curlImage.tag }}"
imagePullPolicy: {{ .Values.curlImage.pullPolicy }}
command: ["sh", "-c", "until curl --fail --connect-timeout 3 http://{{.Release.Name}}-template-controller:8081/readyz; do echo 'Waiting for template-controller...'; sleep 5; done"]
securityContext:
allowPrivilegeEscalation: false
Expand All @@ -46,6 +50,13 @@ spec:
capabilities:
drop:
- "ALL"
resources:
limits:
cpu: {{ .Values.curlImage.resources.limits.cpu }}
memory: {{ .Values.curlImage.resources.limits.memory }}
requests:
cpu: {{ .Values.curlImage.resources.requests.cpu }}
memory: {{ .Values.curlImage.resources.requests.memory }}
containers:
- name: cluster-manager
{{- with .Values.clusterManager.image }}
Expand Down Expand Up @@ -147,6 +158,8 @@ spec:
port: {{ .port }}
initialDelaySeconds: 10
periodSeconds: 10
resources:
{{- toYaml .resources | nindent 10 }}
volumeMounts:
- name: openpolicyagent-v1
mountPath: /opt/cluster-manager/rego/v1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Release.Name }}-template-controller
namespace: {{ .Release.Namespace }}
{{- with .Values.templateController.podAnnotations }}
annotations:
{{- toYaml . | nindent 2 }}
Expand Down
24 changes: 22 additions & 2 deletions deployment/charts/cluster-manager/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,13 @@ curlImage:
name: badouralix/curl-jq@sha256
tag: fe8a5ee49f613495df3b57afa86b39f081bd1b3b9ed61248f46c3d3d7df56092
pullPolicy: IfNotPresent
resources:
limits:
cpu: 100m
memory: 64Mi
requests:
cpu: 10m
memory: 16Mi

clusterManager:
image:
Expand Down Expand Up @@ -63,8 +70,11 @@ clusterManager:

## Configure Pods Security Context
podSecurityContext:
#runAsGroup:
runAsNonRoot: true
runAsUser: 65532
runAsGroup: 65532
seccompProfile:
type: RuntimeDefault

## Configure Container Security Context (only main container)
containerSecurityContext:
Expand Down Expand Up @@ -130,8 +140,11 @@ templateController:

## Configure Pods Security Context
podSecurityContext:
#runAsGroup:
runAsNonRoot: true
runAsUser: 65532
runAsGroup: 65532
seccompProfile:
type: RuntimeDefault

## Configure Container Security Context (only main container)
containerSecurityContext:
Expand Down Expand Up @@ -197,6 +210,13 @@ openpolicyagent:
port: 8181
image: openpolicyagent/opa
tag: 1.2.0
resources:
limits:
cpu: 200m
memory: 256Mi
requests:
cpu: 50m
memory: 64Mi
security:
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
Expand Down
90 changes: 45 additions & 45 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ require (
github.com/onsi/ginkgo/v2 v2.28.1
github.com/onsi/gomega v1.39.1
github.com/open-edge-platform/cluster-api-provider-intel v1.3.4
github.com/open-edge-platform/infra-core/inventory/v2 v2.34.3
github.com/open-edge-platform/infra-core/inventory/v2 v2.34.5
github.com/open-edge-platform/orch-library/go v0.6.3
github.com/open-edge-platform/orch-utils/tenancy-datamodel v1.2.2
github.com/stretchr/testify v1.11.1
Expand All @@ -35,7 +35,7 @@ require (
)

require (
buf.build/go/protovalidate v1.0.0 // indirect
buf.build/go/protovalidate v1.1.3 // indirect
cloud.google.com/go/compute/metadata v0.9.0 // indirect
github.com/Masterminds/semver/v3 v3.4.0 // indirect
github.com/cenkalti/backoff/v5 v5.0.3 // indirect
Expand All @@ -44,16 +44,16 @@ require (
github.com/kylelemons/godebug v1.1.0 // indirect
github.com/lestrrat-go/dsig v1.0.0 // indirect
github.com/lestrrat-go/dsig-secp256k1 v1.0.0 // indirect
github.com/lestrrat-go/httprc/v3 v3.0.1 // indirect
github.com/lestrrat-go/jwx/v3 v3.0.11 // indirect
github.com/lestrrat-go/httprc/v3 v3.0.2 // indirect
github.com/lestrrat-go/jwx/v3 v3.0.13 // indirect
github.com/lestrrat-go/option/v2 v2.0.0 // indirect
github.com/oapi-codegen/oapi-codegen/v2 v2.4.1 // indirect
github.com/oasdiff/yaml v0.0.0-20250309154309-f31be36b4037 // indirect
github.com/oasdiff/yaml3 v0.0.0-20250309153720-d2182401db90 // indirect
github.com/speakeasy-api/openapi-overlay v0.9.0 // indirect
github.com/spf13/cobra v1.10.1 // indirect
github.com/valyala/fastjson v1.6.4 // indirect
github.com/vektah/gqlparser/v2 v2.5.30 // indirect
github.com/spf13/cobra v1.10.2 // indirect
github.com/valyala/fastjson v1.6.7 // indirect
github.com/vektah/gqlparser/v2 v2.5.31 // indirect
github.com/vmware-labs/yaml-jsonpath v0.3.2 // indirect
github.com/woodsbury/decimal128 v1.3.0 // indirect
go.yaml.in/yaml/v2 v2.4.3 // indirect
Expand All @@ -65,8 +65,8 @@ require (
)

require (
ariga.io/atlas v0.38.0 // indirect
buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.36.10-20250912141014-52f32327d4b0.1 // indirect
ariga.io/atlas v1.1.0 // indirect
buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.36.11-20260209202127-80ab13bee0bf.1 // indirect
cel.dev/expr v0.25.1 // indirect
entgo.io/contrib v0.7.0 // indirect
entgo.io/ent v0.14.6-0.20251106044941-a777c08cdda4 // indirect
Expand Down Expand Up @@ -104,14 +104,14 @@ require (
github.com/goccy/go-json v0.10.5 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/google/btree v1.1.3 // indirect
github.com/google/cel-go v0.26.1 // indirect
github.com/google/cel-go v0.27.0 // indirect
github.com/google/gnostic-models v0.7.0 // indirect
github.com/google/pprof v0.0.0-20260115054156-294ebfa9ad83 // indirect
github.com/gorilla/mux v1.8.1 // indirect
github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 // indirect
github.com/grpc-ecosystem/go-grpc-middleware/providers/prometheus v1.1.0 // indirect
github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.3.3 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.7 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.28.0 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
Expand All @@ -126,19 +126,19 @@ require (
github.com/josharian/intern v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/k3s-io/cluster-api-k3s v0.3.0
github.com/labstack/echo-contrib v0.17.4 // indirect
github.com/labstack/echo/v4 v4.13.4 // indirect
github.com/labstack/echo-contrib v0.50.1 // indirect
github.com/labstack/echo/v4 v4.15.1 // indirect
github.com/labstack/gommon v0.4.2 // indirect
github.com/lestrrat-go/blackmagic v1.0.4 // indirect
github.com/lestrrat-go/httpcc v1.0.1 // indirect
github.com/lestrrat-go/httprc v1.0.6 // indirect
github.com/lestrrat-go/iter v1.0.2 // indirect
github.com/lestrrat-go/option v1.0.1 // indirect
github.com/lib/pq v1.10.9 // indirect
github.com/lib/pq v1.11.2 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/mattn/go-colorable v0.1.14 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mennanov/fmutils v0.3.4 // indirect
github.com/mennanov/fmutils v0.3.6 // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/mitchellh/go-wordwrap v1.0.1 // indirect
github.com/mitchellh/mapstructure v1.5.1-0.20231216201459-8508981c8b6c // indirect
Expand All @@ -147,19 +147,19 @@ require (
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/open-edge-platform/orch-library/go/dazl v0.5.4 // indirect
github.com/open-policy-agent/opa v1.10.1 // indirect
github.com/open-policy-agent/opa v1.14.0 // indirect
github.com/perimeterx/marshmallow v1.1.5 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/prometheus/client_golang v1.23.2
github.com/prometheus/client_model v0.6.2 // indirect
github.com/prometheus/common v0.67.2 // indirect
github.com/prometheus/procfs v0.17.0 // indirect
github.com/prometheus/common v0.67.5 // indirect
github.com/prometheus/procfs v0.19.2 // indirect
github.com/rcrowley/go-metrics v0.0.0-20250401214520-65e299d6c5c9 // indirect
github.com/rs/zerolog v1.34.0 // indirect
github.com/ryanuber/go-glob v1.0.0 // indirect
github.com/segmentio/asm v1.2.0 // indirect
github.com/sirupsen/logrus v1.9.4-0.20230606125235-dd1b4c2e81af // indirect
github.com/segmentio/asm v1.2.1 // indirect
github.com/sirupsen/logrus v1.9.4 // indirect
github.com/spf13/pflag v1.0.10 // indirect
github.com/stoewer/go-strcase v1.3.1 // indirect
github.com/stretchr/objx v0.5.2 // indirect
Expand All @@ -173,34 +173,34 @@ require (
github.com/zclconf/go-cty v1.16.2 // indirect
github.com/zclconf/go-cty-yaml v1.1.0 // indirect
go.opentelemetry.io/auto/sdk v1.2.1 // indirect
go.opentelemetry.io/contrib/instrumentation/github.com/labstack/echo/otelecho v0.63.0 // indirect
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.63.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.63.0 // indirect
go.opentelemetry.io/otel v1.40.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.40.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.40.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.40.0 // indirect
go.opentelemetry.io/otel/metric v1.40.0 // indirect
go.opentelemetry.io/otel/sdk v1.40.0 // indirect
go.opentelemetry.io/otel/trace v1.40.0 // indirect
go.opentelemetry.io/proto/otlp v1.9.0 // indirect
go.opentelemetry.io/contrib/instrumentation/github.com/labstack/echo/otelecho v0.66.0 // indirect
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.66.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.65.0 // indirect
go.opentelemetry.io/otel v1.43.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.43.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.43.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.43.0 // indirect
go.opentelemetry.io/otel/metric v1.43.0 // indirect
go.opentelemetry.io/otel/sdk v1.43.0 // indirect
go.opentelemetry.io/otel/trace v1.43.0 // indirect
go.opentelemetry.io/proto/otlp v1.10.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.27.1 // indirect
golang.org/x/crypto v0.48.0 // indirect
golang.org/x/exp v0.0.0-20250620022241-b7579e27df2b // indirect
golang.org/x/mod v0.32.0 // indirect
golang.org/x/net v0.49.0 // indirect
golang.org/x/oauth2 v0.34.0 // indirect
golang.org/x/sync v0.19.0 // indirect
golang.org/x/sys v0.41.0 // indirect
golang.org/x/term v0.40.0 // indirect
golang.org/x/text v0.34.0 // indirect
golang.org/x/time v0.13.0 // indirect
golang.org/x/tools v0.41.0 // indirect
golang.org/x/crypto v0.49.0 // indirect
golang.org/x/exp v0.0.0-20250813145105-42675adae3e6 // indirect
golang.org/x/mod v0.33.0 // indirect
golang.org/x/net v0.52.0 // indirect
golang.org/x/oauth2 v0.35.0 // indirect
golang.org/x/sync v0.20.0 // indirect
golang.org/x/sys v0.42.0 // indirect
golang.org/x/term v0.41.0 // indirect
golang.org/x/text v0.35.0 // indirect
golang.org/x/time v0.14.0 // indirect
golang.org/x/tools v0.42.0 // indirect
gomodules.xyz/jsonpatch/v2 v2.5.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20260128011058-8636f8732409 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20260128011058-8636f8732409 // indirect
google.golang.org/grpc v1.79.3 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20260401024825-9d38bb4040a9 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20260401024825-9d38bb4040a9 // indirect
google.golang.org/grpc v1.80.0 // indirect
gopkg.in/evanphx/json-patch.v4 v4.13.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
Expand Down
Loading
Loading