OpenLiberty / open-liberty-operator

Eclipse Public License 2.0
28 stars 36 forks source link

Support DNS configurations #516

Open leochr opened 9 months ago

leochr commented 9 months ago

Support DNS-related configurations including dnsPolicy and dnsConfig

https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/

arturdzm commented 2 weeks ago

One use case is forcing pod to go through public DNS resolvers. Deny all egress to cluster IP CIDR range using NetworkPolicy. In this case DNS resolution within the pod fails with timed out error. Solution: add public DNS resolvers instead of internal one.

  dnsPolicy: "None"
  dnsConfig:
    nameservers:
      - 8.8.8.8
      - 1.1.1.1

I think dnsPolicy: "None is needed otherwise configs are merged for this use case

leochr commented 2 weeks ago

Confirmed with Artur that the config options in our CRDs that we plan to add .spec.dns.policy and .spec.dns.config would be sufficient for the use case described above. So we are good.

kabicin commented 1 week ago

Ready for review RCO: https://github.com/application-stacks/runtime-component-operator/pull/615 Tests: https://github.ibm.com/websphere/operators/pull/159 (RCO #969)