Skip to content

Commit f45afb1

Browse files
committed
fix: mysql e2e test
1 parent 82483d0 commit f45afb1

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

sample-operators/mysql-schema/src/main/java/io/javaoperatorsdk/operator/sample/SecretDependentResource.java

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,17 @@ public class SecretDependentResource extends KubernetesDependentResource<Secret,
1515
implements AssociatedSecondaryResourceIdentifier<MySQLSchema> {
1616

1717
public SecretDependentResource() {
18-
setDesiredSupplier((schema, context) -> new SecretBuilder()
19-
.withNewMetadata()
20-
.withName(context.getMandatory(MYSQL_SECRET_NAME, String.class))
21-
.withNamespace(schema.getMetadata().getNamespace())
22-
.endMetadata()
23-
.addToData(
24-
"MYSQL_USERNAME", encode(context.getMandatory(MYSQL_SECRET_USERNAME, String.class)))
25-
.addToData(
26-
"MYSQL_PASSWORD", encode(context.getMandatory(MYSQL_SECRET_PASSWORD, String.class)))
27-
.build());
18+
super(Secret.class,
19+
(schema, context) -> new SecretBuilder()
20+
.withNewMetadata()
21+
.withName(context.getMandatory(MYSQL_SECRET_NAME, String.class))
22+
.withNamespace(schema.getMetadata().getNamespace())
23+
.endMetadata()
24+
.addToData(
25+
"MYSQL_USERNAME", encode(context.getMandatory(MYSQL_SECRET_USERNAME, String.class)))
26+
.addToData(
27+
"MYSQL_PASSWORD", encode(context.getMandatory(MYSQL_SECRET_PASSWORD, String.class)))
28+
.build());
2829
}
2930

3031
private static String encode(String value) {

0 commit comments

Comments
 (0)