-
Notifications
You must be signed in to change notification settings - Fork 885
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
karmada operator add the support for custom dns domain #5727
base: master
Are you sure you want to change the base?
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
016f9c6
to
0a06215
Compare
Local Verifcatrion:
# dns/cluster.config
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
name: member5
networking:
nodes:
- role: control-plane
kubeadmConfigPatches:
- |
---
apiVersion: kubeadm.k8s.io/v1beta3
kind: ClusterConfiguration
networking:
dnsDomain: "cluster.remote" $ kind create cluster --config dns/cluster.config --kubeconfig ~/.kube/member5.config
$ kubectl get cm --namespace kube-system coredns -oyaml
...
kubernetes cluster.remote in-addr.arpa ip6.arpa {
...
$ cat /etc/resolv.conf
search default.svc.cluster.remote svc.cluster.remote cluster.remote openstacklocal
# operator/config/samples/karmada-sample.yaml
hostCluster:
networking:
dnsDomain: cluster.remote $ hack/deploy-karmada-operator.sh ~/.kube/member5.config member5
$ hack/deploy-karmada-by-operator.sh ~/.kube/member5.config member5 karmada-apiserver v1.11.1 true https://github.com/karmada-io/karmada/releases/download/v1.11.1/crds.tar.gz
$ kubectl get pods -ntest
NAME READY STATUS RESTARTS AGE
karmada-demo-apiserver-f99cf9578-rcwfr 0/1 CrashLoopBackOff 6 (37s ago) 9m15s
karmada-demo-etcd-0 0/1 Error 6 (3m25s ago) 10m
$ kubectl logs -p --namespace test karmada-demo-etcd-0
{"level":"warn","ts":"2024-10-23T03:13:15.050098Z","caller":"netutil/netutil.go:121","msg":"failed to resolve URL Host","url":"http://karmada-demo-etcd-0.karmada-demo-etcd.test.svc.cluster.local:2380","host":"karmada-demo-etcd-0.karmada-demo-etcd.test.svc.cluster.local:2380","retry-interval":"1s","error":"lookup karmada-demo-etcd-0.karmada-demo-etcd.test.svc.cluster.local on 10.96.0.10:53: no such host"}
{"level":"fatal","ts":"2024-10-23T03:13:15.914938Z","caller":"etcdmain/etcd.go:204","msg":"discovery failed","error":"--initial-cluster has karmada-demo-etcd-0=http://karmada-demo-etcd-0.karmada-demo-etcd.test.svc.cluster.local:2380 but missing from --initial-advertise-peer-urls=http://10.244.0.9:2380 (failed to resolve \"http://karmada-demo-etcd-0.karmada-demo-etcd.test.svc.cluster.local:2380\" (lookup karmada-demo-etcd-0.karmada-demo-etcd.test.svc.cluster.local on 10.96.0.10:53: no such host))","stacktrace":"go.etcd.io/etcd/server/v3/etcdmain.startEtcdOrProxyV2\n\tgo.etcd.io/etcd/server/v3/etcdmain/etcd.go:204\ngo.etcd.io/etcd/server/v3/etcdmain.Main\n\tgo.etcd.io/etcd/server/v3/etcdmain/main.go:40\nmain.main\n\tgo.etcd.io/etcd/server/v3/main.go:31\nruntime.main\n\truntime/proc.go:267"}
$ kubectl get pods -ntest
NAME READY STATUS RESTARTS AGE
karmada-demo-aggregated-apiserver-5fcb5fbb88-x55mb 1/1 Running 0 5m7s
karmada-demo-apiserver-c6465f7b4-ls79h 1/1 Running 0 5m19s
karmada-demo-controller-manager-778bc5886d-ds9p6 1/1 Running 0 4m28s
karmada-demo-descheduler-689c679547-mfxqt 1/1 Running 0 4m28s
karmada-demo-etcd-0 1/1 Running 0 5m20s
karmada-demo-kube-controller-manager-78cd4fbcff-n75nk 1/1 Running 0 4m28s
karmada-demo-metrics-adapter-5cbd5dfcd5-krxbk 1/1 Running 0 4m28s
karmada-demo-metrics-adapter-5cbd5dfcd5-pf87h 1/1 Running 0 4m28s
karmada-demo-scheduler-7569cf8678-bp7d2 1/1 Running 0 4m28s
karmada-demo-search-ddb4979f9-gbwz8 1/1 Running 0 103s
karmada-demo-webhook-7bcd6f9dd7-9tljx 1/1 Running 0 4m28s
$ ginkgo -v --race --trace -p --focus="[BasicPropagation] propagation testing deployment propagation testing" ./test/e2e/
Ran 3 of 241 Specs in 26.319 seconds
SUCCESS! -- 3 Passed | 0 Failed | 0 Pending | 238 Skipped
Ginkgo ran 1 suite in 1m29.083269686s
Test Suite Passed |
3c5c8d8
to
40265f6
Compare
Codecov ReportAttention: Patch coverage is
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## master #5727 +/- ##
==========================================
+ Coverage 40.85% 40.86% +0.01%
==========================================
Files 651 651
Lines 55256 55267 +11
==========================================
+ Hits 22574 22586 +12
Misses 31241 31241
+ Partials 1441 1440 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Signed-off-by: zhzhuang-zju <[email protected]>
40265f6
to
796514a
Compare
What type of PR is this?
/kind feature
What this PR does / why we need it:
karmada/operator/pkg/apis/operator/v1alpha1/type.go
Lines 173 to 178 in 4d0181c
Currently, the
Karmada
API provides a field to configure a custom DNS domain, but this capability has not been implemented in the actual installation process. I hope to introduce support for custom DNS domains in the Karmada operator.Which issue(s) this PR fixes:
Parts of #5722
Special notes for your reviewer:
Does this PR introduce a user-facing change?: