Flip to using DNSCluster for cluster discovery#3327
Conversation
Greptile SummaryThis PR replaces Key changes:
Confidence Score: 4/5
|
| Filename | Overview |
|---|---|
| assets/src/components/cd/services/service/ServiceComponentsFiles.tsx | Adds base64 decoding for service file content. The decodeBase64 helper uses atob, which doesn't correctly handle UTF-8 multi-byte sequences in file content. |
| lib/console/graphql/deployments/service.ex | Adds a custom resolver to the :service_file object that base64-encodes content before returning it over GraphQL, enabling safe transport of binary or complex text content. |
| lib/console/graphql/deployments/stack.ex | Changes stack_tarball resolver return type from :stack_file to :service_file, which will now base64-encode its content field. Test updated accordingly. |
| lib/console/application.ex | Replaces {Cluster.Supervisor, [topologies, ...]} with {DNSCluster, query: ...} for cluster discovery, removing the libcluster dependency entirely from the supervision tree. |
| rel/runtime.exs | Replaces libcluster topology config with a single dns_cluster_query config key, defaulting to console-headless.<NAMESPACE> with a fallback namespace of plrl-console. |
Comments Outside Diff (1)
-
assets/src/components/cd/services/service/ServiceComponentsFiles.tsx, line 116-122 (link)atobdoes not correctly handle UTF-8 contentatobdecodes base64 to a binary string where each character represents one byte. For file content that contains multi-byte UTF-8 sequences (e.g. non-ASCII characters like accented letters, CJK characters, or emoji), this will produce garbled output sinceatobdoesn't interpret the bytes as UTF-8.The backend uses
Base.encode64on raw bytes, so decoding should account for UTF-8:This ensures multi-byte UTF-8 sequences are correctly decoded from the raw binary data returned by
atob.
Last reviewed commit: f4c9c64
703dad8 to
dcbfade
Compare
90127d4 to
f4c9c64
Compare
f4c9c64 to
032e9a5
Compare
This will give two things: * eliminate libclusters use of the endpoints api that will be deprecated in kubernetes * still provide cluster discovery in a way that aligns w/ k8s readiness probes (which is when it is added to the headless service)
032e9a5 to
d68c587
Compare
This will give two things:
Test Plan
e2e
Checklist
Plural Flow: console