Skip to content

Commit

Permalink
feat(shulker-crds): specify scale subresource for ProxyFleet and Mine…
Browse files Browse the repository at this point in the history
…craftServerFleet (#623)
  • Loading branch information
jeremylvln authored Aug 24, 2024
1 parent b3b5d29 commit 569e010
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2409,4 +2409,7 @@ spec:
served: true
storage: true
subresources:
scale:
specReplicasPath: .spec.replicas
statusReplicasPath: .status.replicas
status: {}
3 changes: 3 additions & 0 deletions kube/helm/templates/crds/shulkermc.io_proxyfleets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2348,4 +2348,7 @@ spec:
served: true
storage: true
subresources:
scale:
specReplicasPath: .spec.replicas
statusReplicasPath: .status.replicas
status: {}
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ use crate::{
version = "v1alpha1",
namespaced,
status = "MinecraftServerFleetStatus",
scale = r#"{"specReplicasPath": ".spec.replicas", "statusReplicasPath": ".status.replicas"}"#,
printcolumn = r#"{"name": "Replicas", "type": "integer", "jsonPath": ".status.replicas"}, {"name": "Age", "type": "date", "jsonPath": ".metadata.creationTimestamp"}"#
)]
#[serde(rename_all = "camelCase")]
Expand Down
1 change: 1 addition & 0 deletions packages/shulker-crds/src/v1alpha1/proxy_fleet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ use crate::{
version = "v1alpha1",
namespaced,
status = "ProxyFleetStatus",
scale = r#"{"specReplicasPath": ".spec.replicas", "statusReplicasPath": ".status.replicas"}"#,
printcolumn = r#"{"name": "Replicas", "type": "integer", "jsonPath": ".status.replicas"}, {"name": "Age", "type": "date", "jsonPath": ".metadata.creationTimestamp"}"#
)]
#[serde(rename_all = "camelCase")]
Expand Down
2 changes: 1 addition & 1 deletion packages/shulker-utils/src/time.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ pub fn now() -> DateTime<Utc> {

#[cfg(feature = "testing")]
thread_local! {
pub static UTC_TIME_SECONDS: std::sync::atomic::AtomicI64 = std::sync::atomic::AtomicI64::new(0);
pub static UTC_TIME_SECONDS: std::sync::atomic::AtomicI64 = const { std::sync::atomic::AtomicI64::new(0) };
}

#[cfg(feature = "testing")]
Expand Down

0 comments on commit 569e010

Please sign in to comment.