Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove psp #262

Merged
merged 3 commits into from
Dec 10, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- Update Kyverno PolicyException to v2beta1.

### Removed

- Remove PSP.

## [0.9.0] - 2024-10-03

### Added
Expand Down
4 changes: 0 additions & 4 deletions helm/object-storage-operator/templates/_resource.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@ room for such suffix.
{{- include "resource.default.name" . -}}-network-policy
{{- end -}}

{{- define "resource.psp.name" -}}
{{- include "resource.default.name" . -}}-psp
{{- end -}}

{{- define "resource.policyException.name" -}}
{{- include "resource.default.name" . -}}-policy-exception
{{- end -}}
Expand Down
37 changes: 0 additions & 37 deletions helm/object-storage-operator/templates/psp.yaml

This file was deleted.

36 changes: 0 additions & 36 deletions helm/object-storage-operator/templates/rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -115,39 +115,3 @@ roleRef:
kind: ClusterRole
name: {{ include "resource.default.name" . }}
apiGroup: rbac.authorization.k8s.io
---
{{- if not .Values.global.podSecurityStandards.enforced }}
{{- if .Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicy" }}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
labels:
{{- include "labels.common" . | nindent 4 }}
name: {{ include "resource.psp.name" . }}
rules:
- apiGroups:
- policy
- extensions
resources:
- podsecuritypolicies
verbs:
- use
resourceNames:
- {{ include "resource.psp.name" . }}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
labels:
{{- include "labels.common" . | nindent 4 }}
name: {{ include "resource.psp.name" . }}
subjects:
- kind: ServiceAccount
name: {{ include "resource.default.name" . }}
namespace: {{ include "resource.default.namespace" . }}
roleRef:
kind: ClusterRole
name: {{ include "resource.psp.name" . }}
apiGroup: rbac.authorization.k8s.io
{{- end }}
{{- end }}
12 changes: 12 additions & 0 deletions helm/object-storage-operator/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@
"managementCluster": {
"type": "object",
"properties": {
"baseDomain": {
"type": "string"
},
"name": {
"type": "string"
},
Expand All @@ -86,9 +89,15 @@
"type": "string"
}
}
},
"region": {
"type": "string"
}
}
},
"metricsPort": {
"type": "integer"
},
"networkPolicy": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -116,6 +125,9 @@
}
}
},
"probePort": {
"type": "integer"
},
"resources": {
"type": "object",
"properties": {
Expand Down
2 changes: 1 addition & 1 deletion helm/object-storage-operator/values.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
global:
podSecurityStandards:
enforced: false
enforced: true
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why even keeping this value then ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If that gets changed later on

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But you just killed the logic behind it, so it does not make sense to keep this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True :D


image:
registry: gsoci.azurecr.io
Expand Down
Loading