forked from jeremylvln/Shulker
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(shulker-crds): migrate to fabric8 kubernetes api
- Loading branch information
1 parent
c159ad5
commit cc649b0
Showing
89 changed files
with
220 additions
and
12,715 deletions.
There are no files selected for viewing
This file contains 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
36 changes: 36 additions & 0 deletions
36
support/shulker-crds/src/main/java/io/shulkermc/models/MinecraftCluster.java
This file contains 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,36 @@ | ||
package io.shulkermc.models; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import io.fabric8.kubernetes.api.model.Namespaced; | ||
import io.fabric8.kubernetes.client.CustomResource; | ||
import io.fabric8.kubernetes.model.annotation.Group; | ||
import io.fabric8.kubernetes.model.annotation.Version; | ||
|
||
@Version("v1alpha1") | ||
@Group("shulkermc.io") | ||
public class MinecraftCluster extends CustomResource<MinecraftClusterSpec, MinecraftClusterStatus> implements Namespaced { | ||
@JsonProperty("pool") | ||
protected MinecraftClusterPool pool; | ||
|
||
public void setPool(MinecraftClusterPool pool) { | ||
this.pool = pool; | ||
} | ||
|
||
public MinecraftClusterPool getPool() { | ||
return this.pool; | ||
} | ||
|
||
@Override | ||
public boolean equals(Object o) { | ||
if (!super.equals(o)) return false; | ||
MinecraftCluster that = (MinecraftCluster) o; | ||
return this.pool.equals(that.pool); | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
int result = super.hashCode(); | ||
result = 31 * result + this.pool.hashCode(); | ||
return result; | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
support/shulker-crds/src/main/java/io/shulkermc/models/MinecraftClusterList.java
This file contains 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 @@ | ||
package io.shulkermc.models; | ||
|
||
import io.fabric8.kubernetes.client.CustomResourceList; | ||
|
||
public class MinecraftClusterList extends CustomResourceList<MinecraftCluster> { | ||
} |
36 changes: 36 additions & 0 deletions
36
support/shulker-crds/src/main/java/io/shulkermc/models/MinecraftClusterPool.java
This file contains 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,36 @@ | ||
package io.shulkermc.models; | ||
|
||
import java.util.List; | ||
|
||
public class MinecraftClusterPool { | ||
private List<ServerEntry> servers; | ||
|
||
public void setServers(List<ServerEntry> servers) { | ||
this.servers = servers; | ||
} | ||
|
||
public List<ServerEntry> getServers() { | ||
return this.servers; | ||
} | ||
|
||
public static class ServerEntry { | ||
private String name; | ||
private String address; | ||
|
||
public void setName(String name) { | ||
this.name = name; | ||
} | ||
|
||
public void setAddress(String address) { | ||
this.address = address; | ||
} | ||
|
||
public String getName() { | ||
return this.name; | ||
} | ||
|
||
public String getAddress() { | ||
return this.address; | ||
} | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
support/shulker-crds/src/main/java/io/shulkermc/models/MinecraftClusterSpec.java
This file contains 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,13 @@ | ||
package io.shulkermc.models; | ||
|
||
public class MinecraftClusterSpec { | ||
private String mavenSecretName; | ||
|
||
public void setMavenSecretName(String mavenSecretName) { | ||
this.mavenSecretName = mavenSecretName; | ||
} | ||
|
||
public String getMavenSecretName() { | ||
return this.mavenSecretName; | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
support/shulker-crds/src/main/java/io/shulkermc/models/MinecraftClusterStatus.java
This file contains 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,22 @@ | ||
package io.shulkermc.models; | ||
|
||
public class MinecraftClusterStatus { | ||
private int proxies; | ||
private int servers; | ||
|
||
public void setProxies(int proxies) { | ||
this.proxies = proxies; | ||
} | ||
|
||
public void setServers(int servers) { | ||
this.servers = servers; | ||
} | ||
|
||
public int getProxies() { | ||
return this.proxies; | ||
} | ||
|
||
public int getServers() { | ||
return this.servers; | ||
} | ||
} |
Oops, something went wrong.