Skip to content

Commit 2711d98

Browse files
authored
Merge pull request #616 from oracle/schema-fix5
Schema issue: use webLogicCredentialsSecret
2 parents aa15e81 + c9f95c8 commit 2711d98

File tree

16 files changed

+67
-62
lines changed

16 files changed

+67
-62
lines changed

kubernetes/samples/scripts/create-weblogic-domain/domain-home-in-image/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ spec:
125125
imagePullPolicy: "Never"
126126
# Identify which Secret contains the WebLogic Admin credentials (note that there is an example of
127127
# how to create that Secret at the end of this file)
128-
adminSecret:
128+
webLogicCredentialsSecret:
129129
name: domain1-weblogic-credentials
130130
# Whether to include the server out file into the pod's stdout, default is true
131131
includeServerOutInPodLog: true

kubernetes/samples/scripts/create-weblogic-domain/domain-home-in-image/domain-template.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ spec:
2222
imagePullPolicy: "Never"
2323
# Identify which Secret contains the WebLogic Admin credentials (note that there is an example of
2424
# how to create that Secret at the end of this file)
25-
adminSecret:
25+
webLogicCredentialsSecret:
2626
name: %WEBLOGIC_CREDENTIALS_SECRET_NAME%
2727
# Whether to include the server out file into the pod's stdout, default is true
2828
includeServerOutInPodLog: %INCLUDE_SERVER_OUT_IN_POD_LOG%

kubernetes/samples/scripts/create-weblogic-domain/domain-home-on-pv/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ spec:
146146
#- name:
147147
# Identify which Secret contains the WebLogic Admin credentials (note that there is an example of
148148
# how to create that Secret at the end of this file)
149-
adminSecret:
149+
webLogicCredentialsSecret:
150150
name: domain1-weblogic-credentials
151151
# The name of the Admin Server
152152
asName: "admin-server"

kubernetes/samples/scripts/create-weblogic-domain/domain-home-on-pv/domain-template.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ spec:
2626
%WEBLOGIC_IMAGE_PULL_SECRET_PREFIX%- name: %WEBLOGIC_IMAGE_PULL_SECRET_NAME%
2727
# Identify which Secret contains the WebLogic Admin credentials (note that there is an example of
2828
# how to create that Secret at the end of this file)
29-
adminSecret:
29+
webLogicCredentialsSecret:
3030
name: %WEBLOGIC_CREDENTIALS_SECRET_NAME%
3131
# Whether to include the server out file into the pod's stdout, default is true
3232
includeServerOutInPodLog: %INCLUDE_SERVER_OUT_IN_POD_LOG%

model/src/main/java/oracle/kubernetes/weblogic/domain/v2/Domain.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -289,12 +289,12 @@ public void setStatus(DomainStatus status) {
289289
}
290290

291291
/**
292-
* Reference to secret containing domain administrator username and password.
292+
* Reference to secret containing WebLogic startup credentials username and password.
293293
*
294-
* @return admin secret
294+
* @return credentials secret
295295
*/
296-
public V1SecretReference getAdminSecret() {
297-
return spec.getAdminSecret();
296+
public V1SecretReference getWebLogicCredentialsSecret() {
297+
return spec.getWebLogicCredentialsSecret();
298298
}
299299

300300
/**

model/src/main/java/oracle/kubernetes/weblogic/domain/v2/DomainSpec.java

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,10 @@ public class DomainSpec extends BaseConfiguration {
4545
private String domainHome;
4646

4747
/**
48-
* Reference to secret containing domain administrator username and password. Secret must contain
49-
* keys names 'username' and 'password' (Required)
48+
* Reference to secret containing WebLogic startup credentials username and password. Secret must
49+
* contain keys names 'username' and 'password' (Required)
5050
*/
51-
@Valid @NotNull private V1SecretReference adminSecret;
51+
@Valid @NotNull private V1SecretReference webLogicCredentialsSecret;
5252

5353
/**
5454
* The in-pod name of the directory to store the domain, node manager, server logs, and server
@@ -264,24 +264,24 @@ public DomainSpec withImage(String image) {
264264
return this;
265265
}
266266

267-
public V1SecretReference getAdminSecret() {
268-
return adminSecret;
267+
public V1SecretReference getWebLogicCredentialsSecret() {
268+
return webLogicCredentialsSecret;
269269
}
270270

271271
@SuppressWarnings("unused")
272-
public void setAdminSecret(V1SecretReference adminSecret) {
273-
this.adminSecret = adminSecret;
272+
public void setWebLogicCredentialsSecret(V1SecretReference webLogicCredentialsSecret) {
273+
this.webLogicCredentialsSecret = webLogicCredentialsSecret;
274274
}
275275

276276
/**
277-
* Reference to secret containing domain administrator username and password. Secret must contain
278-
* keys names 'username' and 'password' (Required)
277+
* Reference to secret containing WebLogic startup credentials username and password. Secret must
278+
* contain keys names 'username' and 'password' (Required)
279279
*
280-
* @param adminSecret admin secret
280+
* @param webLogicCredentialsSecret WebLogic startup credentials secret
281281
* @return this
282282
*/
283-
public DomainSpec withAdminSecret(V1SecretReference adminSecret) {
284-
this.adminSecret = adminSecret;
283+
public DomainSpec withWebLogicCredentialsSecret(V1SecretReference webLogicCredentialsSecret) {
284+
this.webLogicCredentialsSecret = webLogicCredentialsSecret;
285285
return this;
286286
}
287287

@@ -477,7 +477,7 @@ public String toString() {
477477
.append("domainUID", domainUID)
478478
.append("domainHome", domainHome)
479479
.append("domainHomeInImage", domainHomeInImage)
480-
.append("adminSecret", adminSecret)
480+
.append("webLogicCredentialsSecret", webLogicCredentialsSecret)
481481
.append("image", image)
482482
.append("imagePullPolicy", imagePullPolicy)
483483
.append("storage", storage)
@@ -503,7 +503,7 @@ public int hashCode() {
503503
.append(domainUID)
504504
.append(domainHome)
505505
.append(domainHomeInImage)
506-
.append(adminSecret)
506+
.append(webLogicCredentialsSecret)
507507
.append(image)
508508
.append(imagePullPolicy)
509509
.append(storage)
@@ -533,7 +533,7 @@ public boolean equals(Object other) {
533533
.append(domainUID, rhs.domainUID)
534534
.append(domainHome, rhs.domainHome)
535535
.append(domainHomeInImage, rhs.domainHomeInImage)
536-
.append(adminSecret, rhs.adminSecret)
536+
.append(webLogicCredentialsSecret, rhs.webLogicCredentialsSecret)
537537
.append(image, rhs.image)
538538
.append(storage, rhs.storage)
539539
.append(imagePullPolicy, rhs.imagePullPolicy)

model/src/test/java/oracle/kubernetes/weblogic/domain/DomainTestBase.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public abstract class DomainTestBase {
5151
protected static Domain createDomain() {
5252
return new Domain()
5353
.withMetadata(new V1ObjectMeta().namespace(NS))
54-
.withSpec(new DomainSpec().withAdminSecret(SECRET).withDomainUID(DOMAIN_UID));
54+
.withSpec(new DomainSpec().withWebLogicCredentialsSecret(SECRET).withDomainUID(DOMAIN_UID));
5555
}
5656

5757
protected abstract DomainConfigurator configureDomain(Domain domain);
@@ -66,7 +66,7 @@ protected static String getNamespace() {
6666

6767
@Test
6868
public void canGetAdminServerInfoFromDomain() {
69-
assertThat(domain.getAdminSecret(), equalTo(SECRET));
69+
assertThat(domain.getWebLogicCredentialsSecret(), equalTo(SECRET));
7070
}
7171

7272
@Test

model/src/test/resources/oracle/kubernetes/weblogic/domain/v2/domain-sample-2.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ metadata:
99
namespace: domain_ns
1010
spec:
1111
# Identify which Secret contains the WebLogic Admin credentials
12-
adminSecret:
12+
webLogicCredentialsSecret:
1313
name: admin-secret
1414
# The domainUID must be unique across the entire Kubernetes Cluster. Each WebLogic Domain must
1515
# have its own unique domainUID. This does not have to be the same as the Domain Name. It is allowed

model/src/test/resources/oracle/kubernetes/weblogic/domain/v2/domain-sample-3.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ metadata:
99
namespace: domain_ns
1010
spec:
1111
# Identify which Secret contains the WebLogic Admin credentials
12-
adminSecret:
12+
webLogicCredentialsSecret:
1313
name: admin-secret
1414
adminServer:
1515
# the T3 endpoints to export. Each entry is an endpoint name,

model/src/test/resources/oracle/kubernetes/weblogic/domain/v2/domain-sample.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ metadata:
99
namespace: domain_ns
1010
spec:
1111
# Identify which Secret contains the WebLogic Admin credentials
12-
adminSecret:
12+
webLogicCredentialsSecret:
1313
name: admin-secret
1414
# The domainUID must be unique across the entire Kubernetes Cluster. Each WebLogic Domain must
1515
# have its own unique domainUID. This does not have to be the same as the Domain Name. It is allowed

0 commit comments

Comments
 (0)