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

Add deprecation warning for PodSecurityPolicies #1595

Merged
merged 8 commits into from
Oct 28, 2021
4 changes: 3 additions & 1 deletion docs/api_reference/v1beta1.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ Features controls what features will be enabled on the cluster
| ----- | ----------- | ------ | -------- |
| podNodeSelector | PodNodeSelector | *[PodNodeSelector](#podnodeselector) | false |
| podPresets | PodPresets Deprecated: will be removed once Kubernetes 1.19 reaches EOL | *[PodPresets](#podpresets) | false |
| podSecurityPolicy | PodSecurityPolicy | *[PodSecurityPolicy](#podsecuritypolicy) | false |
| podSecurityPolicy | PodSecurityPolicy Deprecated: will be removed once Kubernetes 1.24 reaches EOL | *[PodSecurityPolicy](#podsecuritypolicy) | false |
| staticAuditLog | StaticAuditLog | *[StaticAuditLog](#staticauditlog) | false |
| dynamicAuditLog | DynamicAuditLog | *[DynamicAuditLog](#dynamicauditlog) | false |
| metricsServer | MetricsServer | *[MetricsServer](#metricsserver) | false |
Expand Down Expand Up @@ -543,6 +543,8 @@ Kubernetes 1.19 reaches EOL.
### PodSecurityPolicy

PodSecurityPolicy feature flag
This feature is deprecated and will be removed from the API once
Kubernetes 1.24 reaches EOL.

| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
Expand Down
2 changes: 2 additions & 0 deletions pkg/features/psp.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ func installKubeSystemPSP(psp *kubeoneapi.PodSecurityPolicy, s *state.State) err
return nil
}

s.Logger.Warnf("PodSecurityPolicy is deprecated and will be removed with Kubernetes 1.25 release")

ctx := context.Background()
k8sobjects := []client.Object{
privilegedPSP(),
Expand Down