Skip to content

Commit

Permalink
Switch to global PSP value (#292)
Browse files Browse the repository at this point in the history
  • Loading branch information
fhielpos authored Jan 16, 2024
1 parent a70522c commit fc835ee
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 13 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Changed

- Switch PSP values from `psp.enabled` to `global.podSecurityStandards.enforced`.

## [0.7.7] - 2023-12-19

### Added
Expand Down
2 changes: 1 addition & 1 deletion helm/starboard-exporter/templates/psp.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{ if .Values.psp.enabled }}
{{- if not .Values.global.podSecurityStandards.enforced }}
apiVersion: policy/v1beta1
kind: PodSecurityPolicy
metadata:
Expand Down
2 changes: 1 addition & 1 deletion helm/starboard-exporter/templates/rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ roleRef:
name: {{ include "resource.default.name" . }}
apiGroup: rbac.authorization.k8s.io
---
{{ if .Values.psp.enabled }}
{{ if not .Values.global.podSecurityStandards.enforced }}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
Expand Down
21 changes: 13 additions & 8 deletions helm/starboard-exporter/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,19 @@
}
}
},
"global": {
"type": "object",
"properties": {
"podSecurityStandards": {
"type": "object",
"properties": {
"enforced": {
"type": "boolean"
}
}
}
}
},
"image": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -178,14 +191,6 @@
}
}
},
"psp": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
}
}
},
"registry": {
"type": "object",
"properties": {
Expand Down
7 changes: 4 additions & 3 deletions helm/starboard-exporter/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ image:

imagePullSecrets: {}

global:
podSecurityStandards:
enforced: false

pod:
user:
id: 1000
Expand Down Expand Up @@ -72,9 +76,6 @@ monitoring:
enabled: true
# namespace: ""

psp:
enabled: true

networkpolicy:
enabled: true

Expand Down

0 comments on commit fc835ee

Please sign in to comment.