cockroachdb / helm-charts

Helm charts for cockroachdb
Apache License 2.0
84 stars 148 forks source link

Fix: NetworkPolicies for custom grpc rules #383

Open m-rcl opened 7 months ago

m-rcl commented 7 months ago

as stated in https://github.com/cockroachdb/helm-charts/issues/24 it's not possible to use networkPolicies with custom grpc rules. PR https://github.com/cockroachdb/helm-charts/pull/297 seems to be stale and the proposed solution renders strangely for the default of grpc (empty array).

This PR renders

networkPolicy:
  enabled: true
  ingress:
    grpc:
    - podSelector:
        matchLabels:
          app.kubernetes.io/instance: foo

into

[...]
  ingress:
    - ports:
        - port: grpc
      from:
        # Allow connections via custom rules.
        - podSelector:
            matchLabels:
              app.kubernetes.io/instance: foo
        # Allow client connection via pre-considered label.
        - podSelector:
            matchLabels:
[...]

and

networkPolicy:
  enabled: true
# leave grpc as empty array

into

[...]
  ingress:
    - ports:
        - port: grpc
      from:
        # Allow client connection via pre-considered label.
        - podSelector:
            matchLabels:
[...]
m-rcl commented 5 months ago

Hi @prafull01, any chance we might get this merged soon?

m-rcl commented 3 months ago

Hi @rail, is there anyone else who might have a look at this PR?

m-rcl commented 2 months ago

@rail @prafull01 - any update?

m-rcl commented 2 weeks ago

@rail @prafull01 - This is still an issue with the lastest 14.0.5 chart. Any chance we might get this minor fix solved soon? @udnay - Maybe you could have a look?