googleforgames/open-match

Helm installation not working

Opened this issue · 2 comments

What happened:
helm fails to build kubernetes with an error

Error: INSTALLATION FAILED: unable to build kubernetes objects from release manifest: [resource mapping not found for name: "open-match-redis-podsecuritypolicy" namespace: "open-match" from "": no matches for kind "PodSecurityPolicy" in version "policy/v1beta1"
ensure CRDs are installed first, resource mapping not found for name: "open-match-core-podsecuritypolicy" namespace: "open-match" from "": no matches for kind "PodSecurityPolicy" in version "policy/v1beta1"
ensure CRDs are installed first]

What you expected to happen:
helm build and install open-match kubernetes objects

How to reproduce it (as minimally and precisely as possible):
helm repo add open-match https://open-match.dev/chart/stable
helm install open-match --create-namespace --namespace open-match open-match/open-match --version=1.7.0

Anything else we need to know?:
I think problem with policy1/v1beta which had been deprecated in kubernates 1.25
https://kubernetes.io/docs/reference/using-api/deprecation-guide/#poddisruptionbudget-v125

Output of kubectl version:
Client Version: v1.27.1
Kustomize Version: v5.0.1
Server Version: v1.26.3

Cloud Provider/Platform (AKS, GKE, Minikube etc.):
Minkube

Open Match Release Version:
1.7.0

Install Method(yaml/helm):
Helm

Hi @szvyagin-gj, You are right! The problem is PodSecurityPolicy been deprecated since v1.21 of kubernetes and removed from v1.25+. This issue will not be there after the release of Open Match 1.8.0. You can check it here. As a workaround for now, Since you are using Minikube as a cloud Provider/Platform I would suggest to use kubernetes version below till 1.24. And you can do this by providing --kubernetes-version flag while starting the Minikube.
minikube start --cpus=3 --memory=2500mb --kubernetes-version=v1.23.0

This is a longer workaround if you are wanting to use K8s 1.25+. I put together a patch to the 1.6.0 (should be the same with 1.7.0 I believe) through helm+kustomize.

This is all part of a wider demo, so please ignore some of the file templating and use Cloud Deploy (which uses Skaffold):

So top level kustomize file is here (we generate files from Terraform):
https://github.com/googleforgames/global-multiplayer-demo/blob/main/infrastructure/files/open-match/kustomization.yaml.tpl

This turns off all subcharts (because they are all a mess atm, and in prod we don't need them), and includes patches that removes all PodSecurityPolicy's in the install (basically backporting #1540)

The above template file gets generated into the directory below, which has the rest of the patch and resource files you should need:
https://github.com/googleforgames/global-multiplayer-demo/tree/main/platform/open-match/base