Skip to content

Commit

Permalink
[stable/insights-agent] fix rbac for opa (#1350)
Browse files Browse the repository at this point in the history
* fix rbac for opa

* update version

---------

Co-authored-by: Andy Suderman <andy@fairwinds.com>
  • Loading branch information
rbren and sudermanjr authored Oct 17, 2023
1 parent 05c57fe commit 8acf1f1
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 2 deletions.
3 changes: 3 additions & 0 deletions stable/insights-agent/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog

## 2.24.3
* Fix for adding additional rules for OPA via insights-admission

## 2.24.2
* bump `pluto` to version 5.18

Expand Down
2 changes: 1 addition & 1 deletion stable/insights-agent/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v1
description: A Helm chart to run the Fairwinds Insights agent
name: insights-agent
version: 2.24.2
version: 2.24.3
appVersion: 9.2.1
kubeVersion: ">= 1.22.0-0"
icon: https://raw.githubusercontent.com/FairwindsOps/charts/master/stable/insights-agent/icon.png
Expand Down
26 changes: 26 additions & 0 deletions stable/insights-agent/ci/test-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,32 @@ prometheus:
admission:
enabled: true

insights-admission:
webhookConfig:
failurePolicy: Ignore
rules:
- apiGroups:
- ""
apiVersions:
- "v1"
operations:
- CREATE
- UPDATE
- DELETE
resources:
- namespaces
scope: Cluster
- apiGroups:
- apps
apiVersions:
- "v1"
operations:
- DELETE
resources:
- deployments
- statefulsets
scope: Cluster

awscosts:
enabled: false
secretName: awscosts-secret
Expand Down
2 changes: 1 addition & 1 deletion stable/insights-agent/templates/opa/rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ metadata:
name: {{ include "insights-agent.fullname" $ }}-opa-admission-targetresources
labels:
app: insights-agent
{{- range $AdmissionValues.webhookConfig.rules }}
rules:
{{- range $AdmissionValues.webhookConfig.rules }}
- apiGroups:
{{ toYaml .apiGroups | indent 2 }}
resources:
Expand Down

0 comments on commit 8acf1f1

Please sign in to comment.