Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add coredns rewrite config #6428

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions system/cc-ceph/ci/test-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
30 changes: 30 additions & 0 deletions system/cc-ceph/templates/coredns-configmap.yaml
Original file line number Diff line number Diff line change
@@ -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 }}
7 changes: 7 additions & 0 deletions system/cc-ceph/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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