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

feat: support providing external servers #631

Merged
merged 4 commits into from
Aug 25, 2024
Merged

Conversation

jeremylvln
Copy link
Owner

@jeremylvln jeremylvln commented Aug 25, 2024

The external servers can be provided by filling the externalServers field in the MinecraftCluster:

apiVersion: shulkermc.io/v1alpha1
kind: MinecraftCluster
metadata:
  name: getting-started
spec:
  externalServers:
    - name: external
      address: 127.0.0.1
      tags:
        - my_tag
    - name: external2
      address: 127.0.0.2

Closes #630

@jeremylvln jeremylvln added the type:enhancement 🚀 New feature or request label Aug 25, 2024
@jeremylvln jeremylvln self-assigned this Aug 25, 2024
@jeremylvln jeremylvln force-pushed the feat/630-external-servers branch from 31b7d14 to c39ba63 Compare August 25, 2024 17:35
@jeremylvln jeremylvln enabled auto-merge (squash) August 25, 2024 17:36
Copy link

codecov bot commented Aug 25, 2024

Codecov Report

Attention: Patch coverage is 73.33333% with 28 lines in your changes missing coverage. Please review.

Project coverage is 32.99%. Comparing base (a8e2e70) to head (c39ba63).
Report is 2 commits behind head on main.

Files Patch % Lines
...lker-operator/src/reconcilers/proxy_fleet/fleet.rs 84.14% 13 Missing ⚠️
...-operator/src/reconcilers/minecraft_cluster/mod.rs 0.00% 8 Missing ⚠️
...s/minecraft_cluster/external_servers_config_map.rs 53.33% 7 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #631      +/-   ##
==========================================
+ Coverage   31.65%   32.99%   +1.33%     
==========================================
  Files          58       59       +1     
  Lines        3124     3228     +104     
==========================================
+ Hits          989     1065      +76     
- Misses       2135     2163      +28     
Flag Coverage Δ
shulker-addon-matchmaking 23.02% <ø> (ø)
shulker-crds 92.30% <ø> (ø)
shulker-operator 60.25% <73.33%> (+0.91%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
...ges/shulker-crds/src/v1alpha1/minecraft_cluster.rs 0.00% <ø> (ø)
...s/minecraft_cluster/external_servers_config_map.rs 53.33% <53.33%> (ø)
...-operator/src/reconcilers/minecraft_cluster/mod.rs 11.53% <0.00%> (-0.97%) ⬇️
...lker-operator/src/reconcilers/proxy_fleet/fleet.rs 81.93% <84.14%> (+0.68%) ⬆️

@jeremylvln jeremylvln merged commit 86b4804 into main Aug 25, 2024
12 checks passed
@jeremylvln jeremylvln deleted the feat/630-external-servers branch August 25, 2024 17:45
@ajh123
Copy link
Contributor

ajh123 commented Aug 25, 2024

@jeremylvln How would you predefine the proxy's forwarding secret? External servers are "external" so Shulker can't automatically assign the secret on them.

Without this, external severs won't work because they can't be authenticated by the proxy.

@jeremylvln
Copy link
Owner Author

jeremylvln commented Aug 25, 2024

@jeremylvln How would you predefine the proxy's forwarding secret? External servers are "external" so Shulker can't automatically assign the secret on them.

Without this, external severs won't work because they can't be authenticated by the proxy.

Shulker generates a random secret when creating a MinecraftCluster and then never modifies it. It is stored in a secret named forwarding-secret.

You can change it if you want, but you'll need to restart the proxies. Or you can take it and update your servers.

I keep in mind that I should say this in the future documentation!

jeremylvln pushed a commit that referenced this pull request Aug 25, 2024
## [0.10.0](v0.9.0...v0.10.0) (2024-08-25)

### ✨ Features ✨

* **shulker-proxy-agent:** expose player teleporting in API ([#629](#629)) ([111ca37](111ca37))
* support providing external servers ([#631](#631)) ([86b4804](86b4804))

### 🐛 Bug Fixes 🐛

* **shulker-proxy-agent:** crash when LoadBalancer service does not have any ingress in status ([#627](#627)) ([8be044a](8be044a))
* **shulker-proxy-agent:** do not watch service if preferred address is provided ([a8e2e70](a8e2e70))
Copy link

🎉 This issue has been resolved in version 0.10.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@ajh123
Copy link
Contributor

ajh123 commented Aug 25, 2024

@jeremylvln Can confirm these features work successfully!

As you can see, I can connect to my Fabric server using a Shulker managed proxy.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:enhancement 🚀 New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ability to define "external" servers
2 participants