Skip to content

Commit

Permalink
Merge branch 'main' into cli-apply-resource-level
Browse files Browse the repository at this point in the history
  • Loading branch information
shahadarsh authored Dec 5, 2023
2 parents c16a7cf + e73a9f8 commit 73cfca9
Show file tree
Hide file tree
Showing 11 changed files with 66 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/actions/argocd-update/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,5 +74,5 @@ runs:
git add --all
# debugging
git diff HEAD
git commit -m "Update from tembo-io/tembo-stacks: ${{ inputs.version }}"
git commit -m "Update from tembo-io/tembo: ${{ inputs.version }}"
git push origin ${{ inputs.branch }}
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
# This allows for filtering out unchanged directories
# in a pull request, and using all directories on the release
# or main branches.
changed_relative_to_branch: ${{ github.base_ref || 'not-a-branch' }}
changed_relative_to_ref: origin/${{ github.base_ref || 'not-a-branch' }}
ignore_dirs: ".coredb examples"

build_and_push_images:
Expand Down
1 change: 1 addition & 0 deletions examples/run-tembo-locally/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
FROM quay.io/tembo/tembo-pg-cnpg:latest

USER root

RUN chown -R postgres:postgres $PGDATA && \
chmod -R 0700 $PGDATA
ENV PGDATA /var/lib/postgresql/data2
Expand Down
2 changes: 1 addition & 1 deletion tembo-operator/Cargo.lock

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

2 changes: 1 addition & 1 deletion tembo-operator/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "controller"
description = "Tembo Operator for Postgres"
version = "0.21.4"
version = "0.22.0"
edition = "2021"
default-run = "controller"
license = "Apache-2.0"
Expand Down
1 change: 0 additions & 1 deletion tembo-operator/src/extensions/database_queries.rs
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,6 @@ pub async fn is_not_restarting(
})?
.into();


let pg_postmaster = match pg_postmaster_result {
Ok(result) => result.stdout.ok_or_else(|| {
error!("{cdb_name}: select pg_postmaster_start_time() had no stdout");
Expand Down
1 change: 0 additions & 1 deletion tembo-operator/src/stacks/config_engines.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,6 @@ pub fn mq_config_engine(stack: &Stack) -> Vec<PgConfig> {
configs
}


// olap formula for max_parallel_workers_per_gather
fn olap_max_parallel_workers_per_gather(cpu: i32) -> i32 {
// higher of default (2) or 0.5 * cpu
Expand Down
3 changes: 3 additions & 0 deletions tembo-operator/src/stacks/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ lazy_static! {
serde_yaml::from_str(include_str!("templates/oltp.yaml")).expect("oltp.yaml not found");
pub static ref VECTOR_DB: Stack =
serde_yaml::from_str(include_str!("templates/vectordb.yaml")).expect("vectordb.yaml not found");
pub static ref GEOSPATIAL: Stack =
serde_yaml::from_str(include_str!("templates/gis.yaml")).expect("gis.yaml not found");
}

pub fn get_stack(entity: StackType) -> types::Stack {
Expand All @@ -31,5 +33,6 @@ pub fn get_stack(entity: StackType) -> types::Stack {
StackType::OLAP => OLAP.clone(),
StackType::OLTP => OLTP.clone(),
StackType::VectorDB => VECTOR_DB.clone(),
StackType::Geospatial => GEOSPATIAL.clone(),
}
}
55 changes: 55 additions & 0 deletions tembo-operator/src/stacks/templates/gis.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Geospatial
description: Postgres for geospatial workloads.
image: "quay.io/tembo/standard-cnpg:15.3.0-1-1096aeb"
stack_version: 0.1.0
compute_templates:
- cpu: 1
memory: 4Gi
- cpu: 2
memory: 8Gi
- cpu: 4
memory: 16Gi
- cpu: 8
memory: 32Gi
- cpu: 16
memory: 32Gi
postgres_config_engine: standard
postgres_config:
- name: autovacuum_vacuum_cost_limit
value: -1
- name: autovacuum_vacuum_scale_factor
value: 0.05
- name: autovacuum_vacuum_insert_scale_factor
value: 0.05
- name: autovacuum_analyze_scale_factor
value: 0.05
- name: checkpoint_timeout
value: 10min
- name: track_activity_query_size
value: 2048
- name: wal_compression
value: 'on'
- name: track_io_timing
value: 'on'
- name: log_min_duration_statement # https://www.postgresql.org/docs/15/runtime-config-logging.html
value: 1000
- name: pg_stat_statements.track
value: all
- name: shared_preload_libraries
value: pg_stat_statements
trunk_installs:
- name: pg_stat_statements
version: 1.10.0
- name: postgis
version: 3.4.0
extensions:
- name: pg_stat_statements
locations:
- database: postgres
enabled: true
version: 1.10.0
- name: postgis
locations:
- database: postgres
enabled: true
version: 3.4.0
4 changes: 3 additions & 1 deletion tembo-operator/src/stacks/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ use schemars::JsonSchema;
use serde::{Deserialize, Serialize};
use utoipa::ToSchema;


#[derive(Clone, Debug, Default, Serialize, Deserialize, JsonSchema, PartialEq, ToSchema)]
pub enum StackType {
DataWarehouse,
Expand All @@ -21,6 +20,7 @@ pub enum StackType {
#[default]
OLTP,
VectorDB,
Geospatial,
}

impl std::str::FromStr for StackType {
Expand All @@ -35,6 +35,7 @@ impl std::str::FromStr for StackType {
"OLAP" => Ok(StackType::OLAP),
"OLTP" => Ok(StackType::OLTP),
"VectorDB" => Ok(StackType::VectorDB),
"Geospatial" => Ok(StackType::Geospatial),
_ => Err("invalid value"),
}
}
Expand All @@ -50,6 +51,7 @@ impl StackType {
StackType::OLAP => "OLAP",
StackType::OLTP => "OLTP",
StackType::VectorDB => "VectorDB",
StackType::Geospatial => "Geospatial",
}
}
}
Expand Down
1 change: 0 additions & 1 deletion tembo-operator/tests/integration_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1159,7 +1159,6 @@ mod test {
}
});


// Use the patch method to update the Cluster resource
let params = PatchParams::default();
let patch = Patch::Merge(patch_json);
Expand Down

0 comments on commit 73cfca9

Please sign in to comment.