Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Merged by Bors] - Set explicit resources on all containers #345

Closed
wants to merge 26 commits into from
Closed
Show file tree
Hide file tree
Changes from 8 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
472c86c
Add resource quotas for smoke tests.
razvan Jun 6, 2023
47cc336
Update CHANGELOG.md
razvan Jun 6, 2023
714f249
First working smoke test. OS version probably broken.
razvan Jun 14, 2023
51b8d69
Can install Minio on OS now.
razvan Jun 14, 2023
f0d6d9d
Revert "Can install Minio on OS now."
razvan Jun 15, 2023
4ae9d20
Use the Minio bitnami chart everywhere.
razvan Jun 16, 2023
058c732
Update operator-rs version
razvan Jun 16, 2023
80ce64b
Update clap version
razvan Jun 16, 2023
0050610
Update code to new module structure of operator-rs.
razvan Jun 16, 2023
5a4ff0e
Add comment to the necessity of Minio in the smoke test.
razvan Jun 16, 2023
afefa2a
make regenerate charts.
razvan Jun 16, 2023
9b1b721
Update resource requests.
razvan Jun 16, 2023
12d90ef
Update default resource requests for the Hive container.
razvan Jun 19, 2023
62e22c7
Update default resource requests und docs.
razvan Jun 19, 2023
7471818
Remove unused storage field.
razvan Jun 19, 2023
5f9f537
Remove outdated storage docs
razvan Jun 19, 2023
8f8b16e
Update CHANGELOG.md
razvan Jun 19, 2023
938d814
docs: Remove outdated storage attribute
sbernauer Jun 19, 2023
6b4e45b
Implement review feedback.
razvan Jun 19, 2023
57a4372
Update limit range test step.
razvan Jun 19, 2023
7d924b7
Update docs/modules/hive/pages/usage.adoc
razvan Jun 19, 2023
bafe8d8
Update docs/modules/hive/pages/usage.adoc
razvan Jun 19, 2023
1823e3b
Update tests/templates/kuttl/smoke/00-limit-range.yaml
razvan Jun 19, 2023
8dc317b
collapse imports
razvan Jun 19, 2023
5eb088c
Add the data field back to avoid breaking changes in the next release.
razvan Jun 20, 2023
535c328
Raise res reqs for the vector container.
razvan Jun 20, 2023
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
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ All notable changes to this project will be documented in this file.

- Generate OLM bundle for Release 23.4.0 ([#338]).
- Missing CRD defaults for `status.conditions` field ([#340]).
- Add support for resource quotas ([#345])
razvan marked this conversation as resolved.
Show resolved Hide resolved

### Changed

Expand All @@ -19,6 +20,7 @@ All notable changes to this project will be documented in this file.
[#337]: https://github.com/stackabletech/hive-operator/pull/337
[#338]: https://github.com/stackabletech/hive-operator/pull/338
[#340]: https://github.com/stackabletech/hive-operator/pull/340
[#345]: https://github.com/stackabletech/hive-operator/pull/345

## [23.4.0] - 2023-04-17

Expand Down
4 changes: 2 additions & 2 deletions Cargo.lock

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

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ members = [
"rust/crd", "rust/operator-binary"
]

# [patch."https://github.com/stackabletech/operator-rs.git"]
# stackable-operator = { git = "https://github.com/stackabletech//operator-rs.git", branch = "main" }
#[patch."https://github.com/stackabletech/operator-rs.git"]
#stackable-operator = { git = "https://github.com/stackabletech//operator-rs.git", branch = "feature/resource-quotas" }
sbernauer marked this conversation as resolved.
Show resolved Hide resolved
2 changes: 1 addition & 1 deletion rust/crd/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ indoc = "1.0.8"
serde = "1.0"
serde_json = "1.0"
snafu = "0.7"
stackable-operator = { git = "https://github.com/stackabletech/operator-rs.git", tag = "0.41.0" }
stackable-operator = { git = "https://github.com/stackabletech/operator-rs.git", tag = "0.42.1" }
strum = { version = "0.24", features = ["derive"] }
tracing = "0.1"

Expand Down
6 changes: 3 additions & 3 deletions rust/operator-binary/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ publish = false

[dependencies]
anyhow = "1.0"
clap = "4.0"
clap = "4.3"
fnv = "1.0"
futures = { version = "0.3", features = ["compat"] }
pin-project = "1.0"
Expand All @@ -19,12 +19,12 @@ serde = "1.0"
serde_json = "1.0"
snafu = "0.7"
stackable-hive-crd = { path = "../crd" }
stackable-operator = { git = "https://github.com/stackabletech/operator-rs.git", tag = "0.41.0" }
stackable-operator = { git = "https://github.com/stackabletech/operator-rs.git", tag = "0.42.1" }
strum = { version = "0.24", features = ["derive"] }
tokio = { version = "1.23", features = ["full"] }
tracing = "0.1"

[build-dependencies]
built = { version = "0.5", features = ["chrono", "git2"] }
stackable-operator = { git = "https://github.com/stackabletech/operator-rs.git", tag = "0.41.0" }
stackable-operator = { git = "https://github.com/stackabletech/operator-rs.git", tag = "0.42.1" }
stackable-hive-crd = { path = "../crd" }
16 changes: 15 additions & 1 deletion rust/operator-binary/src/controller.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
//! Ensures that `Pod`s are configured and running for each [`HiveCluster`]
use stackable_operator::builder::resources::ResourceRequirementsBuilder;
razvan marked this conversation as resolved.
Show resolved Hide resolved

use crate::command::{self, build_container_command_args, S3_SECRET_DIR};
use crate::product_logging::{extend_role_group_config_map, resolve_vector_aggregator_address};
use crate::{discovery, OPERATOR_NAME};
Expand Down Expand Up @@ -200,6 +202,10 @@ pub enum Error {
BuildRbacResources {
source: stackable_operator::error::Error,
},
#[snafu(display("failed to build pod template"))]
BuildTemplate {
source: stackable_operator::error::Error,
},
}
type Result<T, E = Error> = std::result::Result<T, E>;

Expand Down Expand Up @@ -832,11 +838,19 @@ fn build_metastore_rolegroup_statefulset(
}

if merged_config.logging.enable_vector_agent {
let resources = ResourceRequirementsBuilder::new()
.with_cpu_limit("500m")
razvan marked this conversation as resolved.
Show resolved Hide resolved
razvan marked this conversation as resolved.
Show resolved Hide resolved
.with_cpu_request("100m")
.with_memory_limit("40Mi")
.with_memory_request("8Mi")
.build();

pod_builder.add_container(product_logging::framework::vector_container(
resolved_product_image,
STACKABLE_CONFIG_DIR_NAME,
STACKABLE_LOG_DIR_NAME,
merged_config.logging.containers.get(&Container::Vector),
resources,
));
}

Expand Down Expand Up @@ -866,7 +880,7 @@ fn build_metastore_rolegroup_statefulset(
..LabelSelector::default()
},
service_name: rolegroup_ref.object_name(),
template: pod_builder.build_template(),
template: pod_builder.build_template().context(BuildTemplateSnafu)?,
razvan marked this conversation as resolved.
Show resolved Hide resolved
razvan marked this conversation as resolved.
Show resolved Hide resolved
volume_claim_templates: Some(vec![merged_config
.resources
.storage
Expand Down
5 changes: 5 additions & 0 deletions tests/templates/kuttl/smoke/00-limit-range.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
apiVersion: kuttl.dev/v1beta1
razvan marked this conversation as resolved.
Show resolved Hide resolved
kind: TestStep
commands:
- script: kubectl apply -n $NAMESPACE -f limit-range.yaml
razvan marked this conversation as resolved.
Show resolved Hide resolved
27 changes: 0 additions & 27 deletions tests/templates/kuttl/smoke/00-s3-secret.yaml.j2

This file was deleted.

24 changes: 0 additions & 24 deletions tests/templates/kuttl/smoke/01-install-minio-certificates.yaml.j2

This file was deleted.

24 changes: 0 additions & 24 deletions tests/templates/kuttl/smoke/02-install-minio.yaml.j2

This file was deleted.

50 changes: 0 additions & 50 deletions tests/templates/kuttl/smoke/02-setup-minio-os.yaml.j2

This file was deleted.

12 changes: 0 additions & 12 deletions tests/templates/kuttl/smoke/04-prepare-bucket-os.yaml.j2

This file was deleted.

Loading