Skip to content

Commit

Permalink
Repo rename (#1020)
Browse files Browse the repository at this point in the history
* Repo rename kube-rs -> kube

via:
```
fastmod -m 'kube-rs/kube-rs' 'kube-rs/kube'
```

Signed-off-by: clux <sszynrae@gmail.com>

* straggler

Signed-off-by: clux <sszynrae@gmail.com>

* fastmod rename master/main

some selective pickings

Signed-off-by: clux <sszynrae@gmail.com>

Signed-off-by: clux <sszynrae@gmail.com>
  • Loading branch information
clux committed Sep 22, 2022
1 parent a0db51d commit 2821378
Show file tree
Hide file tree
Showing 29 changed files with 415 additions and 415 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/coverage.yml
Expand Up @@ -3,7 +3,7 @@ name: coverage
on:
push:
branches:
- master
- main
pull_request:

jobs:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/rustfmt.yml
@@ -1,10 +1,10 @@
# When pushed to master, run `cargo +nightly fmt --all` and open a PR.
# When pushed to main, run `cargo +nightly fmt --all` and open a PR.
name: rustfmt
on:
push:
# Limit to `master` because this action creates a PR
# Limit to `main` because this action creates a PR
branches:
- master
- main
jobs:
rustfmt_nightly:
runs-on: ubuntu-latest
Expand Down
720 changes: 360 additions & 360 deletions CHANGELOG.md

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Expand Up @@ -24,7 +24,7 @@ Conduct](https://github.com/cncf/foundation/blob/master/code-of-conduct.md).

## Rust Guidelines

- **Channel**: Code is built and tested using the **stable** channel of Rust, but documented and formatted with **nightly** <sup>[*](https://github.com/kube-rs/kube-rs/issues/707)</sup>
- **Channel**: Code is built and tested using the **stable** channel of Rust, but documented and formatted with **nightly** <sup>[*](https://github.com/kube-rs/kube/issues/707)</sup>
- **Formatting**: To format the codebase, run `just fmt`
- **Documentation** To check documentation, run `just doc`
- **Testing**: To run tests, run `just test` and see below.
Expand Down Expand Up @@ -61,7 +61,7 @@ Most integration tests are run with `cargo test --all --lib -- --ignored`, but b

### End to End Tests

We have a small set of [e2e tests](https://github.com/kube-rs/kube-rs/tree/master/e2e) that tests difference between in-cluster and local configuration.
We have a small set of [e2e tests](https://github.com/kube-rs/kube/tree/main/e2e) that tests difference between in-cluster and local configuration.

These tests are the heaviest tests we have because they require a full `docker build`, image import (or push/pull flow), yaml construction, and `kubectl` usage to verify that the outcome was sufficient.

Expand All @@ -75,7 +75,7 @@ All public interfaces should have doc tests with examples for [docs.rs](https://

When adding new non-trivial pieces of logic that results in a drop in coverage you should add a test.

Cross-reference with the coverage build [![coverage build](https://codecov.io/gh/kube-rs/kube-rs/branch/master/graph/badge.svg?token=9FCqEcyDTZ)](https://codecov.io/gh/kube-rs/kube-rs) and go to your branch. Coverage can also be run locally with [`cargo tarpaulin`](https://github.com/xd009642/tarpaulin) at project root. This will use our [tarpaulin.toml](https://github.com/kube-rs/kube-rs/blob/master/tarpaulin.toml) config, and **will run both unit and integration** tests.
Cross-reference with the coverage build [![coverage build](https://codecov.io/gh/kube-rs/kube/branch/main/graph/badge.svg?token=9FCqEcyDTZ)](https://codecov.io/gh/kube-rs/kube) and go to your branch. Coverage can also be run locally with [`cargo tarpaulin`](https://github.com/xd009642/tarpaulin) at project root. This will use our [tarpaulin.toml](https://github.com/kube-rs/kube/blob/main/tarpaulin.toml) config, and **will run both unit and integration** tests.

#### What type of test

Expand All @@ -98,5 +98,5 @@ In general: **use the least powerful method** of testing available to you:
The [high-level architecture document](https://kube.rs/architecture/) is written for contributors.

### Contact
You can ask general questions / share ideas / query the community at the [kube-rs discussions forum](https://github.com/kube-rs/kube-rs/discussions).
You can ask general questions / share ideas / query the community at the [kube-rs discussions forum](https://github.com/kube-rs/kube/discussions).
You can reach the maintainers of this project at [#kube](https://discord.gg/tokio) channel on the Tokio discord.
14 changes: 7 additions & 7 deletions README.md
Expand Up @@ -20,16 +20,16 @@ kube = { version = "0.75.0", features = ["runtime", "derive"] }
k8s-openapi = { version = "0.16.0", features = ["v1_25"] }
```

[Features are available](https://github.com/kube-rs/kube-rs/blob/master/kube/Cargo.toml#L18).
[Features are available](https://github.com/kube-rs/kube/blob/main/kube/Cargo.toml#L18).

## Upgrading

Please check the [CHANGELOG](https://github.com/kube-rs/kube-rs/blob/master/CHANGELOG.md) when upgrading.
All crates herein are versioned and [released](https://github.com/kube-rs/kube-rs/blob/master/release.toml) together to guarantee [compatibility before 1.0](https://github.com/kube-rs/kube-rs/issues/508).
Please check the [CHANGELOG](https://github.com/kube-rs/kube/blob/main/CHANGELOG.md) when upgrading.
All crates herein are versioned and [released](https://github.com/kube-rs/kube/blob/main/release.toml) together to guarantee [compatibility before 1.0](https://github.com/kube-rs/kube/issues/508).

## Usage

See the **[examples directory](https://github.com/kube-rs/kube-rs/blob/master/examples)** for how to use any of these crates.
See the **[examples directory](https://github.com/kube-rs/kube/blob/main/examples)** for how to use any of these crates.

- **[kube API Docs](https://docs.rs/kube/)**

Expand Down Expand Up @@ -87,7 +87,7 @@ println!("doc: {:?}", d);
println!("crd: {:?}", serde_yaml::to_string(&Document::crd()));
```

There are a ton of kubebuilder-like instructions that you can annotate with here. See the [documentation](https://docs.rs/kube/latest/kube/derive.CustomResource.html) or the `crd_` prefixed [examples](https://github.com/kube-rs/kube-rs/blob/master/examples) for more.
There are a ton of kubebuilder-like instructions that you can annotate with here. See the [documentation](https://docs.rs/kube/latest/kube/derive.CustomResource.html) or the `crd_` prefixed [examples](https://github.com/kube-rs/kube/blob/main/examples) for more.

**NB:** `#[derive(CustomResource)]` requires the `derive` feature enabled on `kube`.

Expand Down Expand Up @@ -148,7 +148,7 @@ Here `reconcile` and `error_policy` refer to functions you define. The first wil

## Rustls

Kube has basic support ([with caveats](https://github.com/kube-rs/kube-rs/issues?q=is%3Aopen+is%3Aissue+label%3Arustls)) for [rustls](https://github.com/ctz/rustls) as a replacement for the `openssl` dependency. To use this, turn off default features, and enable `rustls-tls`:
Kube has basic support ([with caveats](https://github.com/kube-rs/kube/issues?q=is%3Aopen+is%3Aissue+label%3Arustls)) for [rustls](https://github.com/ctz/rustls) as a replacement for the `openssl` dependency. To use this, turn off default features, and enable `rustls-tls`:

```toml
[dependencies]
Expand All @@ -160,7 +160,7 @@ This will pull in `rustls` and `hyper-rustls`.

## musl-libc

Kube will work with [distroless](https://github.com/kube-rs/controller-rs/blob/master/Dockerfile), [scratch](https://github.com/constellation-rs/constellation/blob/27dc89d0d0e34896fd37d638692e7dfe60a904fc/Dockerfile), and `alpine` (it's also possible to use alpine as a builder [with some caveats](https://github.com/kube-rs/kube-rs/issues/331#issuecomment-715962188)).
Kube will work with [distroless](https://github.com/kube-rs/controller-rs/blob/main/Dockerfile), [scratch](https://github.com/constellation-rs/constellation/blob/27dc89d0d0e34896fd37d638692e7dfe60a904fc/Dockerfile), and `alpine` (it's also possible to use alpine as a builder [with some caveats](https://github.com/kube-rs/kube/issues/331#issuecomment-715962188)).

## License

Expand Down
6 changes: 3 additions & 3 deletions deny.toml
Expand Up @@ -12,14 +12,14 @@ yanked = "warn"
notice = "warn"
ignore = [
# Ignoring issues related to `localtime_r` for now
# See https://github.com/kube-rs/kube-rs/issues/650
# See https://github.com/kube-rs/kube/issues/650
#
# Potential segfault in the `time` crate
# Tracking issue: https://github.com/kube-rs/kube-rs/issues/656
# Tracking issue: https://github.com/kube-rs/kube/issues/656
# PR to update `time`: https://github.com/chronotope/chrono/pull/578
"RUSTSEC-2020-0071",
# Potential segfault in `localtime_r` invocations
# Tracking issue: https://github.com/kube-rs/kube-rs/issues/660
# Tracking issue: https://github.com/kube-rs/kube/issues/660
# Upstream issue: https://github.com/chronotope/chrono/issues/499
"RUSTSEC-2020-0159",
]
Expand Down
2 changes: 1 addition & 1 deletion e2e/README.md
Expand Up @@ -12,7 +12,7 @@ Intended as a compilation target to ensure kube builds with any k8s-openapi vers

## job

A more advanced application that is containerised and deployed into a cluster on CI during the `e2e` job via [our ci workflow](https://github.com/kube-rs/kube-rs/blob/2b5e4ad788366125448ad40eadaf68cf9ceeaf31/.github/workflows/ci.yml#L58-L107).
A more advanced application that is containerised and deployed into a cluster on CI during the `e2e` job via [our ci workflow](https://github.com/kube-rs/kube/blob/2b5e4ad788366125448ad40eadaf68cf9ceeaf31/.github/workflows/ci.yml#L58-L107).

Functionally equivalent to the `job_api` example. Creates a noop job, waits for it to complete, then deletes it.

Expand Down
2 changes: 1 addition & 1 deletion kube-client/Cargo.toml
Expand Up @@ -8,7 +8,7 @@ authors = [
"kazk <kazk.dev@gmail.com>",
]
license = "Apache-2.0"
repository = "https://github.com/kube-rs/kube-rs"
repository = "https://github.com/kube-rs/kube"
readme = "../README.md"
keywords = ["kubernetes", "client",]
categories = ["web-programming::http-client"]
Expand Down
6 changes: 3 additions & 3 deletions kube-client/README.md
Expand Up @@ -13,6 +13,6 @@ See the **[kube-client API Docs](https://docs.rs/kube-client/)**

## Development
Help very welcome! To help out on this crate check out these labels:
- https://github.com/kube-rs/kube-rs/labels/client
- https://github.com/kube-rs/kube-rs/labels/api
- https://github.com/kube-rs/kube-rs/labels/config
- https://github.com/kube-rs/kube/labels/client
- https://github.com/kube-rs/kube/labels/api
- https://github.com/kube-rs/kube/labels/config
6 changes: 3 additions & 3 deletions kube-client/src/config/mod.rs
Expand Up @@ -219,7 +219,7 @@ impl Config {
///
/// The `rustls-tls` feature is currently incompatible with
/// [`Config::incluster_env`]. See
/// <https://github.com/kube-rs/kube-rs/issues/1003>.
/// <https://github.com/kube-rs/kube/issues/1003>.
#[cfg(feature = "rustls-tls")]
pub fn incluster() -> Result<Self, InClusterError> {
Self::incluster_dns()
Expand All @@ -234,7 +234,7 @@ impl Config {
/// This method matches the behavior of the official Kubernetes client
/// libraries, but it is not compatible with the `rustls-tls` feature . When
/// this feature is enabled, [`Config::incluster_dns`] should be used
/// instead. See <https://github.com/kube-rs/kube-rs/issues/1003>.
/// instead. See <https://github.com/kube-rs/kube/issues/1003>.
pub fn incluster_env() -> Result<Self, InClusterError> {
let uri = incluster_config::try_kube_from_env()?;
Self::incluster_with_uri(uri)
Expand Down Expand Up @@ -390,7 +390,7 @@ fn certs(data: &[u8]) -> Result<Vec<Vec<u8>>, pem::PemError> {
.collect::<Vec<_>>())
}

// https://github.com/kube-rs/kube-rs/issues/146#issuecomment-590924397
// https://github.com/kube-rs/kube/issues/146#issuecomment-590924397
/// Default Timeout
const DEFAULT_TIMEOUT: Duration = Duration::from_secs(295);
const DEFAULT_CONNECT_TIMEOUT: Duration = Duration::from_secs(30);
Expand Down
2 changes: 1 addition & 1 deletion kube-client/src/discovery/mod.rs
Expand Up @@ -107,7 +107,7 @@ impl Discovery {
/// Ok(())
/// }
/// ```
/// See a bigger example in [examples/dynamic.api](https://github.com/kube-rs/kube-rs/blob/master/examples/dynamic_api.rs)
/// See a bigger example in [examples/dynamic.api](https://github.com/kube-rs/kube/blob/main/examples/dynamic_api.rs)
pub async fn run(mut self) -> Result<Self> {
self.groups.clear();
let api_groups = self.client.list_api_groups().await?;
Expand Down
2 changes: 1 addition & 1 deletion kube-client/src/lib.rs
Expand Up @@ -144,7 +144,7 @@ mod test {
use serde_json::json;
use tower::ServiceBuilder;

// hard disabled test atm due to k3d rustls issues: https://github.com/kube-rs/kube-rs/issues?q=is%3Aopen+is%3Aissue+label%3Arustls
// hard disabled test atm due to k3d rustls issues: https://github.com/kube-rs/kube/issues?q=is%3Aopen+is%3Aissue+label%3Arustls
#[cfg(feature = "when_rustls_works_with_k3d")]
#[tokio::test]
#[ignore] // needs cluster (lists pods)
Expand Down
2 changes: 1 addition & 1 deletion kube-core/Cargo.toml
Expand Up @@ -9,7 +9,7 @@ authors = [
edition = "2021"
rust-version = "1.60.0"
license = "Apache-2.0"
repository = "https://github.com/kube-rs/kube-rs"
repository = "https://github.com/kube-rs/kube"
readme = "../README.md"

[package.metadata.docs.rs]
Expand Down
2 changes: 1 addition & 1 deletion kube-core/README.md
Expand Up @@ -9,4 +9,4 @@ This crate is always re-exported from `kube` (even without features) under [`kub
See the **[kube-core API Docs](https://docs.rs/kube-core/)**

## Development
Help very welcome! We need generic utilities, helpers like those in apimachinery, testing improvements, or just documentation. See https://github.com/kube-rs/kube-rs/labels/core
Help very welcome! We need generic utilities, helpers like those in apimachinery, testing improvements, or just documentation. See https://github.com/kube-rs/kube/labels/core
2 changes: 1 addition & 1 deletion kube-core/src/dynamic.rs
@@ -1,6 +1,6 @@
//! Contains types for using resource kinds not known at compile-time.
//!
//! For concrete usage see [examples prefixed with dynamic_](https://github.com/kube-rs/kube-rs/tree/master/examples).
//! For concrete usage see [examples prefixed with dynamic_](https://github.com/kube-rs/kube/tree/main/examples).

pub use crate::discovery::ApiResource;
use crate::{
Expand Down
2 changes: 1 addition & 1 deletion kube-core/src/params.rs
Expand Up @@ -118,7 +118,7 @@ impl ListParams {
/// Disables watch bookmarks to simplify watch handling
///
/// This is not recommended to use with production watchers as it can cause desyncs.
/// See [#219](https://github.com/kube-rs/kube-rs/issues/219) for details.
/// See [#219](https://github.com/kube-rs/kube/issues/219) for details.
#[must_use]
pub fn disable_bookmarks(mut self) -> Self {
self.bookmarks = false;
Expand Down
2 changes: 1 addition & 1 deletion kube-core/src/schema.rs
Expand Up @@ -16,7 +16,7 @@ use schemars::{
///
/// The following two transformations are applied
/// * Rewrite enums from `oneOf` to `object`s with multiple variants ([schemars#84](https://github.com/GREsau/schemars/issues/84))
/// * Rewrite `additionalProperties` from `#[serde(flatten)]` to `x-kubernetes-preserve-unknown-fields` ([kube-rs#844](https://github.com/kube-rs/kube-rs/issues/844))
/// * Rewrite `additionalProperties` from `#[serde(flatten)]` to `x-kubernetes-preserve-unknown-fields` ([kube#844](https://github.com/kube-rs/kube/issues/844))
///
/// This is used automatically by `kube::derive`'s `#[derive(CustomResource)]`,
/// but it can also be used manually with [`SchemaSettings::with_visitor`].
Expand Down
4 changes: 2 additions & 2 deletions kube-core/src/watch.rs
Expand Up @@ -17,7 +17,7 @@ pub enum WatchEvent<K> {
Modified(K),
/// Resource was deleted
Deleted(K),
/// Resource bookmark. `Bookmark` is a slimmed down `K` due to [#285](https://github.com/kube-rs/kube-rs/issues/285).
/// Resource bookmark. `Bookmark` is a slimmed down `K` due to [#285](https://github.com/kube-rs/kube/issues/285).
///
/// From [Watch bookmarks](https://kubernetes.io/docs/reference/using-api/api-concepts/#watch-bookmarks).
///
Expand All @@ -39,7 +39,7 @@ impl<K> Debug for WatchEvent<K> {
}
}

/// Slimed down K for [`WatchEvent::Bookmark`] due to [#285](https://github.com/kube-rs/kube-rs/issues/285).
/// Slimed down K for [`WatchEvent::Bookmark`] due to [#285](https://github.com/kube-rs/kube/issues/285).
///
/// Can only be relied upon to have metadata with resource version.
/// Bookmarks contain apiVersion + kind + basically empty metadata.
Expand Down
2 changes: 1 addition & 1 deletion kube-derive/Cargo.toml
Expand Up @@ -9,7 +9,7 @@ authors = [
edition = "2021"
rust-version = "1.60.0"
license = "Apache-2.0"
repository = "https://github.com/kube-rs/kube-rs"
repository = "https://github.com/kube-rs/kube"
readme = "../README.md"

[dependencies]
Expand Down
2 changes: 1 addition & 1 deletion kube-derive/README.md
Expand Up @@ -16,4 +16,4 @@ See the **[kube-derive API Docs](https://docs.rs/kube-derive/)**
See the `crd_` prefixed [examples](../examples) for more.

## Development
Help very welcome! Kubebuilder like features, testing improvement, openapi feature. See https://github.com/kube-rs/kube-rs/labels/derive
Help very welcome! Kubebuilder like features, testing improvement, openapi feature. See https://github.com/kube-rs/kube/labels/derive
14 changes: 7 additions & 7 deletions kube-derive/src/lib.rs
Expand Up @@ -52,7 +52,7 @@ mod custom_resource;
///
/// This example posts the generated `::crd` to the `CustomResourceDefinition` API.
/// After this has been accepted (few secs max), you can start using `foos` as a normal
/// kube `Api` object. See the `crd_` prefixed [examples](https://github.com/kube-rs/kube-rs/blob/master/examples/)
/// kube `Api` object. See the `crd_` prefixed [examples](https://github.com/kube-rs/kube/blob/main/examples/)
/// for details on this.
///
/// # Required properties
Expand Down Expand Up @@ -199,13 +199,13 @@ mod custom_resource;
/// # Customizing Schemas
/// Should you need to customize the schemas, you can use:
/// - [Serde/Schemars Attributes](https://graham.cool/schemars/examples/3-schemars_attrs/) (no need to duplicate serde renames)
/// - [`#[schemars(schema_with = "func")]`](https://graham.cool/schemars/examples/7-custom_serialization/) (e.g. like in the [`crd_derive` example](https://github.com/kube-rs/kube-rs/blob/master/examples/crd_derive.rs))
/// - `impl JsonSchema` on a type / newtype around external type. See [#129](https://github.com/kube-rs/kube-rs/issues/129#issuecomment-750852916)
/// - [`#[validate(...)]` field attributes with validator](https://github.com/Keats/validator) for kubebuilder style validation rules (see [`crd_api` example](https://github.com/kube-rs/kube-rs/blob/master/examples/crd_api.rs)))
/// - [`#[schemars(schema_with = "func")]`](https://graham.cool/schemars/examples/7-custom_serialization/) (e.g. like in the [`crd_derive` example](https://github.com/kube-rs/kube/blob/main/examples/crd_derive.rs))
/// - `impl JsonSchema` on a type / newtype around external type. See [#129](https://github.com/kube-rs/kube/issues/129#issuecomment-750852916)
/// - [`#[validate(...)]` field attributes with validator](https://github.com/Keats/validator) for kubebuilder style validation rules (see [`crd_api` example](https://github.com/kube-rs/kube/blob/main/examples/crd_api.rs)))
///
/// You might need to override parts of the schemas (for fields in question) when you are:
/// - **using complex enums**: enums do not currently generate [structural schemas](https://kubernetes.io/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions/#specifying-a-structural-schema), so kubernetes won't support them by default
/// - **customizing [merge-strategies](https://kubernetes.io/docs/reference/using-api/server-side-apply/#merge-strategy)** (e.g. like in the [`crd_derive_schema` example](https://github.com/kube-rs/kube-rs/blob/master/examples/crd_derive_schema.rs))
/// - **customizing [merge-strategies](https://kubernetes.io/docs/reference/using-api/server-side-apply/#merge-strategy)** (e.g. like in the [`crd_derive_schema` example](https://github.com/kube-rs/kube/blob/main/examples/crd_derive_schema.rs))
///
/// See [kubernetes openapi validation](https://kubernetes.io/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions/#validation) for the format of the OpenAPI v3 schemas.
///
Expand Down Expand Up @@ -243,7 +243,7 @@ mod custom_resource;
/// - use the [`merge_crds`](https://docs.rs/kube/latest/kube/core/crd/fn.merge_crds.html) fn to combine crds
/// - roll out new schemas utilizing conversion webhooks / manual conversions / or allow kubectl to do its best
///
/// See the [crd_derive_multi](https://github.com/kube-rs/kube-rs/blob/master/examples/crd_derive_multi.rs) example to see
/// See the [crd_derive_multi](https://github.com/kube-rs/kube/blob/main/examples/crd_derive_multi.rs) example to see
/// how this upgrade flow works without special logic.
///
/// The **upgrade flow** with **breaking changes** involves:
Expand All @@ -256,7 +256,7 @@ mod custom_resource;
/// If you need to maintain support for the old version for some time, then you have to repeat or continuously
/// run steps 2 and 3. I.e. you probably need a **conversion webhook**.
///
/// **NB**: kube does currently [not implement conversion webhooks yet](https://github.com/kube-rs/kube-rs/issues/865).
/// **NB**: kube does currently [not implement conversion webhooks yet](https://github.com/kube-rs/kube/issues/865).
///
/// ## Debugging
/// Try `cargo-expand` to see your own macro expansion.
Expand Down
2 changes: 1 addition & 1 deletion kube-runtime/Cargo.toml
Expand Up @@ -7,7 +7,7 @@ authors = [
"clux <sszynrae@gmail.com>",
]
license = "Apache-2.0"
repository = "https://github.com/kube-rs/kube-rs"
repository = "https://github.com/kube-rs/kube"
readme = "../README.md"
keywords = ["kubernetes", "runtime", "reflector", "watcher", "controller"]
categories = ["web-programming::http-client"]
Expand Down

0 comments on commit 2821378

Please sign in to comment.