Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions crd/RestateCluster.pkl
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@ class Compute {
/// Affinity is a group of affinity scheduling rules.
affinity: PodSpec.Affinity?

/// Entrypoint array. Not executed within a shell. The container image's ENTRYPOINT is used if this is not provided.
command: Listing<String>?

/// Arguments to the entrypoint. The container image's CMD is used if this is not provided.
args: Listing<String>?

/// Specifies the DNS parameters of the Restate pod. Parameters specified here will be merged to the
/// generated DNS configuration based on DNSPolicy.
dnsConfig: PodSpec.PodDNSConfig?
Expand Down
12 changes: 12 additions & 0 deletions crd/restateclusters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -549,6 +549,18 @@ spec:
type: array
type: object
type: object
args:
description: Arguments to the entrypoint. The container image's CMD is used if this is not provided.
items:
type: string
nullable: true
type: array
command:
description: Entrypoint array. Not executed within a shell. The container image's ENTRYPOINT is used if this is not provided.
items:
type: string
nullable: true
type: array
dnsConfig:
description: Specifies the DNS parameters of the Restate pod. Parameters specified here will be merged to the generated DNS configuration based on DNSPolicy.
nullable: true
Expand Down
8 changes: 8 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,11 @@ build *flags:

docker:
docker build . -f docker/Dockerfile --tag={{ image }} --progress='{{ DOCKER_PROGRESS }}' --load

fmt:
cargo fmt --all

lint:
cargo clippy

check: fmt lint
2 changes: 2 additions & 0 deletions src/controllers/restatecluster/reconcilers/compute.rs
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,8 @@ fn restate_statefulset(
name: "restate".into(),
image: Some(spec.compute.image.clone()),
image_pull_policy: spec.compute.image_pull_policy.clone(),
command: spec.compute.command.clone(),
args: spec.compute.args.clone(),
env: Some(env),
ports: Some(vec![
ContainerPort {
Expand Down
4 changes: 4 additions & 0 deletions src/resources/restateclusters.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,10 @@ pub struct RestateClusterCompute {
pub replicas: Option<i32>,
/// Container image name. More info: https://kubernetes.io/docs/concepts/containers/images.
pub image: String,
/// Entrypoint array. Not executed within a shell. The container image's ENTRYPOINT is used if this is not provided.
pub command: Option<Vec<String>>,
/// Arguments to the entrypoint. The container image's CMD is used if this is not provided.
pub args: Option<Vec<String>>,
/// Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. More info: https://kubernetes.io/docs/concepts/containers/images#updating-images
pub image_pull_policy: Option<String>,
/// Optional list of references to secrets in the same namespace to use for pulling the image.
Expand Down