diff --git a/system/cc-ceph/ci/test-values.yaml b/system/cc-ceph/ci/test-values.yaml index 3d0bfe2c67..eb193f7075 100644 --- a/system/cc-ceph/ci/test-values.yaml +++ b/system/cc-ceph/ci/test-values.yaml @@ -8,3 +8,12 @@ objectstore: selector: app: test rook_cluster: test + +radosgw: + dnsRewriteEnabled: true + clusterDomain: cluster.local + rewrites: + - from: rgw1.mydomain.net + to: rook-ceph-rgw-my-store-1.rook-ceph.svc.cluster.local + - from: rgw2.mydomain.net + to: rook-ceph-rgw-my-store-2.rook-ceph.svc.cluster.local diff --git a/system/cc-ceph/templates/coredns-configmap.yaml b/system/cc-ceph/templates/coredns-configmap.yaml new file mode 100644 index 0000000000..7745b29d40 --- /dev/null +++ b/system/cc-ceph/templates/coredns-configmap.yaml @@ -0,0 +1,30 @@ +{{ if .Values.radosgw.dnsRewriteEnabled }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: coredns + namespace: kube-system + labels: + addonmanager.kubernetes.io/mode: EnsureExists + kubernikus.cloud.sap/skip-manage: "true" +data: + Corefile: | + .:53 { + errors + health + {{- range .Values.radosgw.rewrites }} + rewrite name {{ .from }} {{ .to }} + {{- end }} + kubernetes {{ .Values.radosgw.clusterDomain | default "cluster.local" }} in-addr.arpa ip6.arpa { + pods insecure + fallthrough in-addr.arpa ip6.arpa + ttl 30 + } + prometheus :9153 + forward . /etc/resolv.conf + cache 30 + loop + reload + loadbalance + } +{{- end }} diff --git a/system/cc-ceph/values.yaml b/system/cc-ceph/values.yaml index a7d0a4c07f..05a9815800 100644 --- a/system/cc-ceph/values.yaml +++ b/system/cc-ceph/values.yaml @@ -74,3 +74,10 @@ objectstore: - 10.0.0.1 user: name: test-user + +radosgw: + dnsRewriteEnabled: false + #clusterDomain: cluster.local + #rewrites: + #- from: rgw.mydomain.net + # to: rook-ceph-rgw-my-store-2.rook-ceph.svc.cluster.local