Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove pulumi-operator and move main to pulumi-operator-kubernetes
This commit removes the separate `pulumi-operator` package because it created unnecessary complexity. Instead, the main runtimes are moved directly under `pulumi-operator-kubernetes`, simplifying project structure. Modifications in `release.yml` ensure the app can be correctly built and published to Docker. Furthermore, the Dockerfile has been added to support these changes. A few minor configurations (ex. image version in `service.rs` and features in `Cargo.toml`) have also been adjusted to suit this new design.
- Loading branch information
Showing
8 changed files
with
48 additions
and
34 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
FROM rust:1.71-buster as chef | ||
WORKDIR /usr/src/pulumi-operator | ||
USER root | ||
ENV CARGO_HOME=/root/.cargo | ||
RUN apt update && apt install -y curl python3-pip npm | ||
RUN curl -fsSL https://get.pulumi.com | sh | ||
ENV PATH="/root/.pulumi/bin:${PATH}" | ||
RUN cargo install cargo-chef | ||
|
||
FROM chef as planner | ||
WORKDIR /usr/src/pulumi-operator | ||
USER root | ||
ENV CARGO_HOME=/root/.cargo | ||
COPY . . | ||
RUN cargo chef prepare --recipe-path recipe.json | ||
|
||
FROM chef as builder | ||
WORKDIR /usr/src/pulumi-operator | ||
USER root | ||
ENV CARGO_HOME=/root/.cargo | ||
COPY --from=planner /usr/src/pulumi-operator/recipe.json recipe.json | ||
RUN cargo chef cook --release --recipe-path recipe.json | ||
COPY . . | ||
RUN cargo install --path pulumi-operator-kubernetes && ls -alh /root/.cargo/bin/pulumi-operator-kubernetes && cp /root/.cargo/bin/pulumi-operator-kubernetes /usr/local/bin/pulumi-operator-kubernetes | ||
|
||
ENTRYPOINT ["pulumi-operator-kubernetes"] |
This file was deleted.
Oops, something went wrong.
8 changes: 6 additions & 2 deletions
8
pulumi-operator/src/main.rs → pulumi-operator-kubernetes/src/main.rs
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 |
---|---|---|
@@ -1,13 +1,17 @@ | ||
use springtime::application; | ||
use springtime_di::instance_provider::ComponentInstancePtr; | ||
|
||
pub mod config_provider; | ||
pub mod kubernetes; | ||
pub mod stack; | ||
|
||
#[tokio::main(flavor = "current_thread")] | ||
async fn main() { | ||
#[cfg(feature = "kubernetes")] | ||
pulumi_operator_kubernetes::bind(); | ||
application::create_default() | ||
.unwrap() | ||
.run() | ||
.await | ||
.expect("could not start controller"); | ||
} | ||
|
||
pub type Inst<T> = ComponentInstancePtr<T>; |
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 was deleted.
Oops, something went wrong.