Skip to content

Commit

Permalink
feat(shulker-crds): add network admins list to cluster
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremylvln committed Nov 2, 2023
1 parent 00df3da commit 86d7135
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
8 changes: 8 additions & 0 deletions kube/resources/crd/bases/shulkermc.io_minecraftclusters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ spec:
properties:
spec:
properties:
networkAdmins:
description: List of player UUIDs that are automatically promoted as network administrators, which are granted all the permissions by default on all the proxies and servers
items:
type: string
type: array
uniqueItems: true
redis:
description: Redis configuration to use as a synchronization backend for the different Shulker components
nullable: true
Expand Down Expand Up @@ -56,6 +62,8 @@ spec:
required:
- type
type: object
required:
- networkAdmins
type: object
status:
description: The status object of `MinecraftCluster`
Expand Down
6 changes: 6 additions & 0 deletions packages/shulker-crds/src/v1alpha1/minecraft_cluster.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ use strum::{Display, IntoStaticStr};
)]
#[serde(rename_all = "camelCase")]
pub struct MinecraftClusterSpec {
/// List of player UUIDs that are automatically promoted as
/// network administrators, which are granted all the permissions
/// by default on all the proxies and servers
#[serde(skip_serializing_if = "Vec::is_empty")]
pub network_admins: Vec<String>,

/// Redis configuration to use as a synchronization backend
/// for the different Shulker components
#[serde(skip_serializing_if = "Option::is_none")]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
use std::collections::HashSet;

use http::{Request, Response};
use hyper::Body;
use kube::{core::ObjectMeta, Client};
Expand All @@ -10,7 +12,10 @@ lazy_static! {
name: Some("my-cluster".to_string()),
..ObjectMeta::default()
},
spec: MinecraftClusterSpec { redis: None },
spec: MinecraftClusterSpec {
network_admins: HashSet::new(),
redis: None
},
status: None,
};
}
Expand Down

0 comments on commit 86d7135

Please sign in to comment.