Skip to content

Commit 8b4d65f

Browse files
committed
cleanup
1 parent 0051178 commit 8b4d65f

7 files changed

Lines changed: 18 additions & 23 deletions

File tree

Cargo.lock

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.nix

Lines changed: 0 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ stackable-operator = { git = "https://github.com/stackabletech/operator-rs.git",
1717
], tag = "stackable-operator-0.109.0" }
1818

1919
anyhow = "1.0"
20-
base64 = "0.22"
2120
built = { version = "0.8", features = ["chrono", "git2"] }
2221
clap = "4.5"
2322
const_format = "0.2"

rust/operator-binary/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ product-config.workspace = true
1313
stackable-operator.workspace = true
1414

1515
anyhow.workspace = true
16-
base64.workspace = true
1716
clap.workspace = true
1817
const_format.workspace = true
1918
fnv.workspace = true

rust/operator-binary/src/airflow_controller.rs

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,11 @@ use crate::{
9393
AirflowAuthenticationClassResolved, AirflowClientAuthenticationDetailsResolved,
9494
},
9595
authorization::AirflowAuthorizationResolved,
96-
build_recommended_labels, v1alpha2,
96+
build_recommended_labels,
97+
internal_secret::{
98+
FERNET_KEY_SECRET_KEY, INTERNAL_SECRET_SECRET_KEY, JWT_SECRET_SECRET_KEY,
99+
},
100+
v1alpha2,
97101
},
98102
env_vars::{self, build_airflow_template_envs},
99103
operations::{
@@ -109,21 +113,6 @@ use crate::{
109113
},
110114
};
111115

112-
// Used for env-vars: AIRFLOW__WEBSERVER__SECRET_KEY, AIRFLOW__API__SECRET_KEY
113-
// N.B. AIRFLOW__WEBSERVER__SECRET_KEY is deprecated as of 3.0.2.
114-
// Secret key used to run the api server. It should be as random as possible.
115-
// It should be consistent across instances of the webserver. The webserver key
116-
// is also used to authorize requests to Celery workers when logs are retrieved.
117-
pub const INTERNAL_SECRET_SECRET_KEY: &str = "INTERNAL_SECRET";
118-
// Used for env-var: AIRFLOW__API_AUTH__JWT_SECRET
119-
// Secret key used to encode and decode JWTs to authenticate to public and
120-
// private APIs. It should be as random as possible, but consistent across
121-
// instances of API services.
122-
pub const JWT_SECRET_SECRET_KEY: &str = "JWT_SECRET";
123-
// Used for env-var: AIRFLOW__CORE__FERNET_KEY
124-
// See https://airflow.apache.org/docs/apache-airflow/stable/security/secrets/fernet.html#security-fernet
125-
pub const FERNET_KEY_SECRET_KEY: &str = "FERNET_KEY";
126-
127116
pub const AIRFLOW_CONTROLLER_NAME: &str = "airflowcluster";
128117
pub const DOCKER_IMAGE_BASE_NAME: &str = "airflow";
129118
pub const AIRFLOW_FULL_CONTROLLER_NAME: &str =
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// Secret key used to run the api server. It should be as random as possible.
2+
// It should be consistent across instances of the webserver. The webserver key
3+
// is also used to authorize requests to Celery workers when logs are retrieved.
4+
pub const INTERNAL_SECRET_SECRET_KEY: &str = "INTERNAL_SECRET";
5+
// Used for env-var: AIRFLOW__API_AUTH__JWT_SECRET
6+
// Secret key used to encode and decode JWTs to authenticate to public and
7+
// private APIs. It should be as random as possible, but consistent across
8+
// instances of API services.
9+
pub const JWT_SECRET_SECRET_KEY: &str = "JWT_SECRET";
10+
// Used for env-var: AIRFLOW__CORE__FERNET_KEY
11+
// See https://airflow.apache.org/docs/apache-airflow/stable/security/secrets/fernet.html#security-fernet
12+
pub const FERNET_KEY_SECRET_KEY: &str = "FERNET_KEY";

rust/operator-binary/src/crd/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ use crate::{
6161
pub mod affinity;
6262
pub mod authentication;
6363
pub mod authorization;
64+
pub mod internal_secret;
6465

6566
pub const APP_NAME: &str = "airflow";
6667
pub const FIELD_MANAGER: &str = "airflow-operator";

0 commit comments

Comments
 (0)