docs(core-concepts): write the service discovery page - #40
Merged
Conversation
Replaces a one-line placeholder. Two mechanisms share this heading and the page separates them: exposing a product (ListenerClass, Listener) and finding one from another product (discovery ConfigMaps). Sources: operator-go's pkg/apis/listeners/v1alpha1 and pkg/listener for the listener half; zookeeper-operator's cluster_extension.go and common/discovery.go, plus hdfs-operator's ClusterConfigSpec, for the discovery half. The listener half documents the three built-in classes and, prominently, that external-unstable is NodePort rather than a LoadBalancer with a changing address. ServiceTypeFor's own comment records that two operators in this project drew opposite conclusions from an earlier wording, so the page states the mapping plainly rather than leaving it to be inferred from the name. Also covers that an unrecognised class falls back to ClusterIP by design, the preferredAddressType rule, why publishNotReadyAddresses defaults to true (a quorum cannot form if members cannot find each other before they report ready), and the CSI volume through which a pod learns its own published address. The discovery half documents the actual ConfigMap keys ZooKeeper publishes, that a cluster always emits one at the root znode and adds a `<cluster>-nodeport` variant under external-unstable, how a consumer references it by ConfigMap name rather than hostname, and why a ZookeeperZnode is the right way to give each product its own subtree. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Third batch of stage 2. One page, both language trees — it was a one-line placeholder.
Independent of #38 and #39: all three branch off
mainand touch different files. Any merge order works.Two mechanisms share this heading, and the page separates them rather than blurring them together:
ListenerClass,ListenerSources:
operator-go'spkg/apis/listeners/v1alpha1andpkg/listenerfor the listener half;zookeeper-operator'scluster_extension.goandcommon/discovery.goplushdfs-operator'sClusterConfigSpecfor the discovery half.The listener half
Documents the three built-in classes and — prominently — that
external-unstableis NodePort, not a LoadBalancer with a changing address:cluster-internalClusterIPexternal-unstableNodePortexternal-stableLoadBalancerServiceTypeFor's own comment records that two operators in this project drew opposite conclusions from an earlier wording, so the page states the mapping plainly instead of leaving it to be inferred from the name.Also covers:
ClusterIPby design — a typo should not produce an accidental public addresspreferredAddressTyperule (HostnameConservativeuses an IP only for NodePort)publishNotReadyAddressesdefaults totrue— a quorum cannot form if members cannot find each other before they report readylisteners.kubedoop.devStorageClass,class/listenerNameannotations) through which a pod learns its own published addressThe discovery half
Documents the actual keys ZooKeeper publishes (
ZOOKEEPER,ZOOKEEPER_HOSTS,ZOOKEEPER_PORT,ZOOKEEPER_CHROOT), that a cluster always emits a ConfigMap at the root znode and adds a<cluster>-nodeportvariant when the listener class isexternal-unstable, how a consumer references it by ConfigMap name rather than hostname (so ZooKeeper can move without editing the HDFS resource), and why aZookeeperZnodeis the right way to give each product its own subtree.Testing
npm run verifyexits 0 — 52 files linted with 0 errors, both locales builtexternal-unstablein the build output)onBrokenLinks: 'throw'would have failed the build otherwiseRemaining stage 2 placeholders
7 left:
kubernetes,kubebuilder,develop-guideline,spark-k8s-operator,faq,release-notes, anddatabase(blocked — see #38).faqandrelease-notescannot be derived from source: one needs real user questions, the other needs release history. Those need maintainer input rather than research.🤖 Generated with Claude Code