Skip to content

Commit f1afb15

Browse files
committed
Address field name feedback; URI -> URL
1 parent e92a4ea commit f1afb15

3 files changed

Lines changed: 30 additions & 30 deletions

File tree

crates/stackable-operator/crds/DummyCluster.yaml

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -124,24 +124,24 @@ spec:
124124
dedicated variant.
125125
126126
Use this when you need a Celery-compatible connection that does not have a first-class
127-
connection type. The complete connection URI is read from a Secret, giving the user full
127+
connection type. The complete connection URL is read from a Secret, giving the user full
128128
control over the connection string.
129129
properties:
130-
uriSecret:
131-
description: The name of the Secret that contains an `uri` key with the complete SQLAlchemy URI.
130+
connectionUrlSecretName:
131+
description: The name of the Secret that contains an `connectionUrl` key with the complete Celery URL.
132132
type: string
133133
required:
134-
- uriSecret
134+
- connectionUrlSecretName
135135
type: object
136136
genericJdbc:
137137
description: |-
138138
A generic JDBC database connection for database types not covered by a dedicated variant.
139139
140140
Use this when you need to connect to a JDBC-compatible database that does not have a
141141
first-class connection type. You are responsible for providing the correct driver class name
142-
and a fully-formed JDBC URI as well as providing the needed classes on the Java classpath.
142+
and a fully-formed JDBC URL as well as providing the needed classes on the Java classpath.
143143
properties:
144-
credentialsSecret:
144+
credentialsSecretName:
145145
description: |-
146146
Name of a Secret containing the `username` and `password` keys used to authenticate
147147
against the database.
@@ -151,36 +151,36 @@ spec:
151151
Fully-qualified Java class name of the JDBC driver, e.g. `org.postgresql.Driver` or
152152
`com.mysql.jdbc.Driver`. The driver JAR must be provided by you on the classpath.
153153
type: string
154-
uri:
154+
url:
155155
description: |-
156-
The JDBC connection URI, e.g. `jdbc:postgresql://my-host:5432/mydb`. Credentials must
157-
not be embedded in this URI; they are instead injected via environment variables sourced
156+
The JDBC connection URL, e.g. `jdbc:postgresql://my-host:5432/mydb`. Credentials must
157+
not be embedded in this URL; they are instead injected via environment variables sourced
158158
from `credentials_secret`.
159159
format: uri
160160
type: string
161161
required:
162-
- credentialsSecret
162+
- credentialsSecretName
163163
- driver
164-
- uri
164+
- url
165165
type: object
166166
genericSqlAlchemy:
167167
description: |-
168168
A generic SQLAlchemy database connection for database types not covered by a dedicated variant.
169169
170170
Use this when you need to connect to a SQLAlchemy-compatible database that does not have a
171-
first-class connection type. The complete connection URI is read from a Secret, giving the user
171+
first-class connection type. The complete connection URL is read from a Secret, giving the user
172172
full control over the connection string including any driver-specific options.
173173
properties:
174-
uriSecret:
175-
description: The name of the Secret that contains an `uri` key with the complete SQLAlchemy URI.
174+
connectionUrlSecretName:
175+
description: The name of the Secret that contains an `connectionUrl` key with the complete SQLAlchemy URL.
176176
type: string
177177
required:
178-
- uriSecret
178+
- connectionUrlSecretName
179179
type: object
180180
mysql:
181181
description: Connection settings for a [MySQL](https://www.mysql.com/) database.
182182
properties:
183-
credentialsSecret:
183+
credentialsSecretName:
184184
description: |-
185185
Name of a Secret containing the `username` and `password` keys used to authenticate
186186
against the MySQL server.
@@ -208,14 +208,14 @@ spec:
208208
minimum: 0.0
209209
type: integer
210210
required:
211-
- credentialsSecret
211+
- credentialsSecretName
212212
- database
213213
- host
214214
type: object
215215
postgresql:
216216
description: Connection settings for a [PostgreSQL](https://www.postgresql.org/) database.
217217
properties:
218-
credentialsSecret:
218+
credentialsSecretName:
219219
description: |-
220220
Name of a Secret containing the `username` and `password` keys used to authenticate
221221
against the PostgreSQL server.
@@ -243,7 +243,7 @@ spec:
243243
minimum: 0.0
244244
type: integer
245245
required:
246-
- credentialsSecret
246+
- credentialsSecretName
247247
- database
248248
- host
249249
type: object
@@ -253,7 +253,7 @@ spec:
253253
254254
Redis is commonly used as a Celery message broker or result backend (e.g. for Apache Airflow).
255255
properties:
256-
credentialsSecret:
256+
credentialsSecretName:
257257
description: |-
258258
Name of a Secret containing the `username` and `password` keys used to authenticate
259259
against the Redis server.
@@ -280,7 +280,7 @@ spec:
280280
minimum: 0.0
281281
type: integer
282282
required:
283-
- credentialsSecret
283+
- credentialsSecretName
284284
- host
285285
type: object
286286
type: object

crates/stackable-operator/src/database_connections/databases/derby.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,15 +50,15 @@ impl JdbcDatabaseConnection for DerbyConnection {
5050
let location = location.to_str().with_context(|| NonUtf8LocationSnafu {
5151
location: location.to_path_buf(),
5252
})?;
53-
let connection_uri = format!("jdbc:derby:{location};create=true",);
54-
let connection_uri = connection_uri.parse().context(ParseConnectionUrlSnafu)?;
53+
let connection_url = format!("jdbc:derby:{location};create=true",);
54+
let connection_url = connection_url.parse().context(ParseConnectionUrlSnafu)?;
5555

5656
Ok(JdbcDatabaseConnectionDetails {
5757
// Sadly the Derby driver class name is a bit complicated, e.g. for HMS up to 4.1.x we used
5858
// "org.apache.derby.jdbc.EmbeddedDriver",
5959
// for HMS 4.2.x we used "org.apache.derby.iapi.jdbc.AutoloadedDriver".
6060
driver: "org.apache.derby.jdbc.EmbeddedDriver".to_owned(),
61-
connection_uri,
61+
connection_url,
6262
username_env: None,
6363
password_env: None,
6464
})

crates/stackable-operator/src/database_connections/databases/mysql.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ pub struct MysqlConnection {
3535

3636
/// Name of a Secret containing the `username` and `password` keys used to authenticate
3737
/// against the MySQL server.
38-
pub credentials_secret: String,
38+
pub credentials_secret_name: String,
3939

4040
/// Additional map of connection parameters to append to the connection URL. The given
4141
/// `HashMap<String, String>` will be converted to query parameters in the form of
@@ -60,22 +60,22 @@ impl JdbcDatabaseConnection for MysqlConnection {
6060
host,
6161
port,
6262
database,
63-
credentials_secret,
63+
credentials_secret_name,
6464
parameters,
6565
} = self;
6666
let (username_env, password_env) =
67-
username_and_password_envs(unique_database_name, credentials_secret);
67+
username_and_password_envs(unique_database_name, credentials_secret_name);
6868

69-
let connection_uri = format!(
69+
let connection_url = format!(
7070
"jdbc:mysql://{host}:{port}/{database}{parameters}",
7171
parameters =
7272
connection_parameters_as_url_query_parameters(parameters).unwrap_or_default()
7373
);
74-
let connection_uri = connection_uri.parse().context(ParseConnectionUrlSnafu)?;
74+
let connection_url = connection_url.parse().context(ParseConnectionUrlSnafu)?;
7575

7676
Ok(JdbcDatabaseConnectionDetails {
7777
driver: "com.mysql.jdbc.Driver".to_owned(),
78-
connection_uri,
78+
connection_url,
7979
username_env: Some(username_env),
8080
password_env: Some(password_env),
8181
})

0 commit comments

Comments
 (0)