operator icon indicating copy to clipboard operation
operator copied to clipboard

Deprecated API ‘policy/v1beta1’ promblem

Open Antknt47 opened this issue 3 years ago • 4 comments

When installing operator, there is a warning: W0119 18:11:46.106962 58989 warnings.go:70] policy/v1beta1 PodSecurityPolicy is deprecated in v1.21+, unavailable in v1.25+

It seems that, 'policy/v1beta1' is deprecated and unavailable in v1.25+. https://kubernetes.io/docs/reference/using-api/deprecation-guide/#removed-apis-by-release

Are there any plans to resolve this promblem?

Antknt47 avatar Jan 20 '22 08:01 Antknt47

Yes, this deprecation must be resolved until v1.24.0 kubernetes release. Will take a look.

f41gh7 avatar Jan 20 '22 09:01 f41gh7

According to deprecation guide, PodSecurityPolicy will be deleted. It means, that operator will make podsecurityPolicy operation noop since kubernetes version 1.23.

f41gh7 avatar Feb 09 '22 17:02 f41gh7

this should be ServerMinorVersion < 21 since

$ kubectl version -o json | jq '.serverVersion'
{
  "major": "1",
  "minor": "21+",
  "gitVersion": "v1.21.5-eks-bc4871b",
  "gitCommit": "5236faf39f1b7a7dabea8df12726f25608131aa9",
  "gitTreeState": "clean",
  "buildDate": "2021-10-29T23:32:16Z",
  "goVersion": "go1.16.8",
  "compiler": "gc",
  "platform": "linux/amd64"
}
$ kubectl api-resources |grep poddisruptionbudgets
poddisruptionbudgets              pdb          policy/v1                              true         PodDisruptionBudget
$ kubectl get deployments victoria-metrics-operator -o json | jq '.spec.template.spec.containers[].image'
"victoriametrics/operator:v0.23.2"

transacid avatar Feb 21 '22 15:02 transacid

I think, it's fine to add some delay between API removals. All modern provides still support it.

f41gh7 avatar Apr 11 '22 22:04 f41gh7

Must be fixed. Feel free to re-open.

f41gh7 avatar Nov 14 '22 15:11 f41gh7