charts icon indicating copy to clipboard operation
charts copied to clipboard

[chart/redis-ha][REQUEST] Migrate from Pod Security Policy to SecurityContext

Open pierluigilenoci opened this issue 2 years ago • 1 comments

Is your feature request related to a problem? Please describe.

Pod Security Policies are deprecated and will be removed in Kubernetes v1.25.

Migration to another alternative is necessary. To date there are some alternative solutions:

Describe the solution you'd like

A solution that is ecumenical and covers all the aforementioned alternatives is the use of Security Context directly in the manifest of the chart.

This change must involve both ha-server and ha-proxy.

Describe alternatives you've considered

A possible solution would be to implement all the major alternatives within the chart but it is certainly a more onerous job.

Additional context

Related to #29

pierluigilenoci avatar Jun 27 '22 12:06 pierluigilenoci

kyverno-cli provides a convenient way to check the manifests statically.

The following command reports 7 violations of the PSS restricted profile policies:

kustomize build https://github.com/kyverno/policies//pod-security | \
  kyverno apply -r \
  <(helm template --repo https://dandydeveloper.github.io/charts redis-ha) \
  -

Relates to https://github.com/haproxytech/helm-charts/issues/150

joebowbeer avatar Jul 10 '22 22:07 joebowbeer

@lord-kyron @DandyDeveloper can you please take a look?

pierluigilenoci avatar Aug 08 '22 10:08 pierluigilenoci

On it hopefully today or tomorrow. Sorry, this wasn't on my radar originally.

@joebowbeer @pierluigilenoci

DandyDeveloper avatar Aug 08 '22 11:08 DandyDeveloper

@DandyDeveloper are you going to look into this? Kubernetes 1.25 is close and if this is going to be deprecated, it will become a real problem.

lord-kyron avatar Aug 12 '22 06:08 lord-kyron

Yes, unfortunately just been busy and it's a holiday in Japan right now.

DandyDeveloper avatar Aug 12 '22 07:08 DandyDeveloper

@DandyDeveloper any news about this?

pierluigilenoci avatar Aug 22 '22 10:08 pierluigilenoci

@joebowbeer @pierluigilenoci I'm on this now, I will need to step away and deal with it in the morning.

I'm currently using kyverno based on the pod-security policy. This all seems very sensible, I'm just working through and making sure the templating is accurate and working as intending.

DandyDeveloper avatar Aug 22 '22 12:08 DandyDeveloper

@joebowbeer @pierluigilenoci Please take a look at the PR, I need a couple pair of eyes to confirm this looks good.

DandyDeveloper avatar Aug 23 '22 00:08 DandyDeveloper