Skip to content

Commit

Permalink
Updates
Browse files Browse the repository at this point in the history
  • Loading branch information
nikoshet committed Oct 18, 2024
1 parent 5e3d834 commit 6292c9f
Show file tree
Hide file tree
Showing 40 changed files with 2,013 additions and 853 deletions.
16 changes: 14 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,26 @@ jobs:
format-and-clippy:
uses: ./.github/workflows/format-workflow.yaml
secrets: inherit
tests:
uses: ./.github/workflows/tests-workflow.yaml
secrets: inherit
build:
runs-on: ubuntu-latest
needs: [format-and-clippy]
needs: [format-and-clippy, tests]
strategy:
fail-fast: true
matrix:
include:
- name: "library"
path: "."
- name: "client"
path: "snap-kube-client"
steps:
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
components: rustfmt, clippy
toolchain: ${{ env.RUST_VERSION }}
- name: Build
- name: Cargo Build ${{ matrix.name }}
run: cargo build --verbose
working-directory: ${{ matrix.path }}
24 changes: 24 additions & 0 deletions .github/workflows/tests-workflow.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Tests Pipeline

on:
workflow_call:

env:
RUST_VERSION: 1.81.0

jobs:
tests:
name: Run Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
components: rustfmt, clippy
toolchain: ${{ env.RUST_VERSION }}
- name: Install cargo-nextest
uses: baptiste0928/cargo-install@v3
with:
crate: cargo-nextest
- name: Run tests
run: cargo nextest run --all
159 changes: 139 additions & 20 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

50 changes: 48 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,20 +1,66 @@
[package]
name = "pvc-snapshotter"
name = "snap-kube"
version = "0.1.0"
edition = "2021"
license = "MIT"
description = "The snap-kube is a Rust tool that can backup and restore k8s PVCs using EBS snapshots"
readme = "README.md"
homepage = "https://github.com/nikoshet/snap-kube"
repository = "https://github.com/nikoshet/snap-kube"
keywords = ["k8s", "pvc", "snapshot", "ebs", "backup", "restore", "aws"]
documentation = "https://docs.rs/snap-kube"
exclude = ["script.sh"]

[dependencies]
[workspace]
members = ["snap-kube-client"]

[workspace.dependencies]
anyhow = "1.0.89"
async-trait = "0.1.83"
aws-config = "1.5.7"
aws-sdk-ec2 = "1.75.0"
clap = { version = "4.5.20", features = ["derive"] }
colored = "2.1.0"
k8s-openapi = { version = "0.23.0", features = ["v1_29"] }
kube = { version = "0.95.0", features = ["runtime", "derive"] }
kube-custom-resources-rs = { version = "2024.6.1", features = ["snapshot_storage_k8s_io"] }
pretty_assertions = "1.4.1"
schemars = "0.8.21"
serde = "1.0.210"
serde_json = "1.0.128"
tokio = { version = "1", features = ["full"] }
tracing = "0.1.40"
tracing-subscriber = "0.3.18"
snap-kube = { path = ".", version = "0.1" }
mockall = "0.13"

[dependencies]
anyhow.workspace = true
async-trait.workspace = true
aws-config.workspace = true
aws-sdk-ec2.workspace = true
clap.workspace = true
colored.workspace = true
k8s-openapi.workspace = true
kube.workspace = true
kube-custom-resources-rs.workspace = true
pretty_assertions.workspace = true
schemars.workspace = true
serde.workspace = true
serde_json.workspace = true
tokio.workspace = true
tracing.workspace = true
tracing-subscriber.workspace = true
mockall.workspace = true

[lib]
test = true
edition = "2021"
crate-type = ["lib"]
name = "snap_kube"

[features]
default = ["full"]
full = ["backup", "restore"]
backup = []
restore = []
22 changes: 0 additions & 22 deletions Dockerfile

This file was deleted.

21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2024 Nick Nikitas

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Loading

0 comments on commit 6292c9f

Please sign in to comment.