-
Notifications
You must be signed in to change notification settings - Fork 5
feat: replace MongoDB example with Minecraft apps from cozylex #2
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
Merged
lexfrei
merged 3 commits into
cozystack:main
from
lexfrei:fix/update-to-applicationdefinition-api
Apr 14, 2026
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,70 @@ | ||
| # Cozystack external-apps demo | ||
| # external-apps-example | ||
|
|
||
| Read more about Cozystack at [cozystack.io](https://cozystack.io). | ||
| External applications catalog example for [Cozystack](https://cozystack.io). Works like a brew tap -- add this repo to your cluster and get extra apps in the Cozystack dashboard. | ||
|
|
||
| Reference documentation for Cozystack external-apps can be found at [cozystack.io/docs/applications/external](https://cozystack.io/docs/applications/external/). | ||
| Currently provides managed Minecraft server and plugin apps powered by [minecraft-operator](https://github.com/lexfrei/minecraft-operator). | ||
|
|
||
| ## Installation | ||
|
|
||
| Apply `init.yaml` to bootstrap the catalog in your Cozystack cluster: | ||
|
|
||
| ```bash | ||
| kubectl apply --filename https://raw.githubusercontent.com/cozystack/external-apps-example/main/init.yaml | ||
| ``` | ||
|
|
||
| This creates a FluxCD `GitRepository` source and a `HelmRelease` that deploys the platform chart. The platform chart registers all available apps via `ApplicationDefinition` CRDs, so they appear in the Cozystack dashboard automatically. | ||
|
|
||
| ## Available Apps | ||
|
|
||
| | App | Kind | Description | | ||
| | --- | --- | --- | | ||
| | minecraft-server | `MinecraftServer` | Managed PaperMC server with automatic updates, backups, and resource limits | | ||
| | minecraft-plugin | `MinecraftPlugin` | Managed plugin installation from [Hangar](https://hangar.papermc.io/) or direct URL with auto-updates | | ||
|
|
||
| Both apps are powered by [minecraft-operator](https://github.com/lexfrei/minecraft-operator), which is deployed automatically by the platform chart from `oci://ghcr.io/lexfrei/charts/minecraft-operator`. | ||
|
|
||
| ## Example | ||
|
|
||
| Create a Minecraft server with the BlueMap plugin (see `examples/minecraft.yaml`): | ||
|
|
||
| ```yaml | ||
| apiVersion: apps.cozystack.io/v1alpha1 | ||
| kind: MinecraftServer | ||
| metadata: | ||
| name: survival | ||
| namespace: tenant-root | ||
| spec: | ||
| updateStrategy: latest | ||
| memoryLimit: 2Gi | ||
| cpuLimit: 2000m | ||
| serviceType: NodePort | ||
| --- | ||
| apiVersion: apps.cozystack.io/v1alpha1 | ||
| kind: MinecraftPlugin | ||
| metadata: | ||
| name: bluemap | ||
| namespace: tenant-root | ||
| spec: | ||
| sourceType: hangar | ||
| project: BlueMap | ||
| updateStrategy: latest | ||
| instanceSelector: | ||
| matchLabels: | ||
| app.kubernetes.io/instance: minecraft-survival | ||
| endpoints: | ||
| - name: web | ||
| port: 8100 | ||
| protocol: HTTP | ||
| ``` | ||
|
|
||
| ## Repository Structure | ||
|
|
||
| ```text | ||
| init.yaml # Bootstrap manifest (GitRepository + HelmRelease) | ||
| packages/ | ||
| core/platform/ # Platform chart: namespaces, HelmCharts, HelmReleases, ApplicationDefinitions | ||
| apps/minecraft-server/ # Helm chart wrapping PaperMCServer CRD | ||
| apps/minecraft-plugin/ # Helm chart wrapping Plugin CRD | ||
| examples/ | ||
| minecraft.yaml # Server + BlueMap plugin example | ||
| ``` |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| --- | ||
| apiVersion: apps.cozystack.io/v1alpha1 | ||
| kind: MinecraftServer | ||
| metadata: | ||
| name: survival | ||
| namespace: tenant-root | ||
| spec: | ||
| updateStrategy: latest | ||
| memoryLimit: 2Gi | ||
| cpuLimit: 2000m | ||
| serviceType: NodePort | ||
| --- | ||
| apiVersion: apps.cozystack.io/v1alpha1 | ||
| kind: MinecraftPlugin | ||
| metadata: | ||
| name: bluemap | ||
| namespace: tenant-root | ||
| spec: | ||
| sourceType: hangar | ||
| project: BlueMap | ||
| updateStrategy: latest | ||
| instanceSelector: | ||
| matchLabels: | ||
| app.kubernetes.io/instance: minecraft-survival | ||
| endpoints: | ||
| - name: web | ||
| port: 8100 | ||
| protocol: HTTP | ||
This file was deleted.
Oops, something went wrong.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -26,4 +26,4 @@ spec: | |
| kind: GitRepository | ||
| name: external-apps | ||
| namespace: cozy-public | ||
| version: '*' | ||
| reconcileStrategy: Revision | ||
Empty file.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| apiVersion: v2 | ||
| name: minecraft-plugin | ||
| description: Managed Minecraft plugin with automatic version management | ||
| type: application | ||
| version: 0.0.0 | ||
| appVersion: "1.0.0" |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| export NAME=minecraft-plugin | ||
| export NAMESPACE=external-minecraft-operator | ||
|
|
||
| include ../../../scripts/package.mk |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| apiVersion: mc.k8s.lex.la/v1beta1 | ||
| kind: Plugin | ||
| metadata: | ||
| name: {{ .Release.Name }} | ||
| spec: | ||
| source: | ||
| type: {{ .Values.sourceType }} | ||
| {{- if eq .Values.sourceType "hangar" }} | ||
| project: {{ .Values.project | quote }} | ||
| {{- end }} | ||
| {{- if eq .Values.sourceType "url" }} | ||
| url: {{ .Values.url | quote }} | ||
| {{- if .Values.checksum }} | ||
| checksum: {{ .Values.checksum | quote }} | ||
| {{- end }} | ||
| {{- end }} | ||
| updateStrategy: {{ .Values.updateStrategy }} | ||
| {{- if .Values.version }} | ||
| version: {{ .Values.version | quote }} | ||
| {{- end }} | ||
| instanceSelector: | ||
| {{- if .Values.instanceSelector.matchLabels }} | ||
| matchLabels: | ||
| {{- range $key, $value := .Values.instanceSelector.matchLabels }} | ||
| {{ $key }}: {{ $value | quote }} | ||
| {{- end }} | ||
| {{- else }} | ||
| matchLabels: {} | ||
| {{- end }} | ||
| {{- if .Values.endpoints }} | ||
| endpoints: | ||
| {{- range .Values.endpoints }} | ||
| - name: {{ .name | quote }} | ||
| port: {{ .port }} | ||
| {{- if .protocol }} | ||
| protocol: {{ .protocol }} | ||
| {{- end }} | ||
| {{- end }} | ||
| {{- end }} |
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.