Skip to content

Commit a8a806c

Browse files
jshum2479rjeberhard
authored andcommitted
rename wdtModelEncryptionSecret o modelEncryptionSecret
1 parent c60672e commit a8a806c

File tree

12 files changed

+49
-46
lines changed

12 files changed

+49
-46
lines changed

documentation/domains/Domain.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -735,10 +735,6 @@
735735
"description": "An optional field that describes the configuration to create a PersistentVolume for `Domain on PV` domain. Omit this section if you have manually created a persistent volume. The operator will perform this one-time create operation only if the persistent volume does not already exist. The operator will not recreate or update the PersistentVolume when it exists. More info: https://oracle.github.io/weblogic-kubernetes-operator/managing-domains/domain-on-pv-initialization#pv",
736736
"$ref": "#/definitions/PersistentVolume"
737737
},
738-
"wdtModelEncryptionPassphraseSecret": {
739-
"description": "Specifies the secret name of the WebLogic Deployment Tool encryption passphrase if the WDT models provided in the \u0027domainCreationImages\u0027 or \u0027domainCreationConfigMap\u0027 are encrypted using the WebLogic Deployment Tool \u0027encryptModel\u0027 command. The secret must use the key \u0027passphrase\u0027 containing the actual passphrase for encryption.",
740-
"type": "string"
741-
},
742738
"domain": {
743739
"description": "Describes the configuration for creating an initial WebLogic Domain in persistent volume (`Domain in PV`). The operator will not recreate or update the domain if it already exists. Required.",
744740
"$ref": "#/definitions/DomainOnPV"
@@ -747,6 +743,10 @@
747743
"description": "An optional field that describes the configuration for creating a PersistentVolumeClaim for `Domain on PV`. PersistentVolumeClaim is a user\u0027s request for and claim to a persistent volume. The operator will perform this one-time create operation only if the persistent volume claim does not already exist. Omit this section if you have manually created a persistent volume claim. If specified, the name must match one of the volumes under `serverPod.volumes` and the domain home must reside in the mount path of the volume using this claim. More info: https://oracle.github.io/weblogic-kubernetes-operator/managing-domains/domain-on-pv-initialization#pvc",
748744
"$ref": "#/definitions/PersistentVolumeClaim"
749745
},
746+
"modelEncryptionPassphraseSecret": {
747+
"description": "Specifies the secret name of the WebLogic Deployment Tool encryption passphrase if the WDT models provided in the \u0027domainCreationImages\u0027 or \u0027domainCreationConfigMap\u0027 are encrypted using the WebLogic Deployment Tool \u0027encryptModel\u0027 command. The secret must use the key \u0027passphrase\u0027 containing the actual passphrase for encryption.",
748+
"type": "string"
749+
},
750750
"setDefaultSecurityContextFsGroup": {
751751
"description": "Specifies whether the operator will set the default \u0027fsGroup\u0027 in the introspector job pod security context. This is needed to create the domain home directory on PV in some environments. If the \u0027fsGroup\u0027 is specified as part of \u0027spec.introspector.serverPod.podSecurityContext\u0027, then the operator will use that \u0027fsGroup\u0027 instead of the default \u0027fsGroup\u0027. Defaults to true.",
752752
"type": "boolean"

documentation/domains/Domain.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,12 +244,12 @@ The current status of the operation of the WebLogic domain. Updated automaticall
244244
| Name | Type | Description |
245245
| --- | --- | --- |
246246
| `domain` | [Domain On PV](#domain-on-pv) | Describes the configuration for creating an initial WebLogic Domain in persistent volume (`Domain in PV`). The operator will not recreate or update the domain if it already exists. Required. |
247+
| `modelEncryptionPassphraseSecret` | string | Specifies the secret name of the WebLogic Deployment Tool encryption passphrase if the WDT models provided in the 'domainCreationImages' or 'domainCreationConfigMap' are encrypted using the WebLogic Deployment Tool 'encryptModel' command. The secret must use the key 'passphrase' containing the actual passphrase for encryption. |
247248
| `persistentVolume` | [Persistent Volume](#persistent-volume) | An optional field that describes the configuration to create a PersistentVolume for `Domain on PV` domain. Omit this section if you have manually created a persistent volume. The operator will perform this one-time create operation only if the persistent volume does not already exist. The operator will not recreate or update the PersistentVolume when it exists. More info: https://oracle.github.io/weblogic-kubernetes-operator/managing-domains/domain-on-pv-initialization#pv |
248249
| `persistentVolumeClaim` | [Persistent Volume Claim](#persistent-volume-claim) | An optional field that describes the configuration for creating a PersistentVolumeClaim for `Domain on PV`. PersistentVolumeClaim is a user's request for and claim to a persistent volume. The operator will perform this one-time create operation only if the persistent volume claim does not already exist. Omit this section if you have manually created a persistent volume claim. If specified, the name must match one of the volumes under `serverPod.volumes` and the domain home must reside in the mount path of the volume using this claim. More info: https://oracle.github.io/weblogic-kubernetes-operator/managing-domains/domain-on-pv-initialization#pvc |
249250
| `runDomainInitContainerAsRoot` | Boolean | Specifies whether the operator will run the domain initialization init container in the introspector job as root. This may be needed in some environments to create the domain home directory on PV. Defaults to false. |
250251
| `setDefaultSecurityContextFsGroup` | Boolean | Specifies whether the operator will set the default 'fsGroup' in the introspector job pod security context. This is needed to create the domain home directory on PV in some environments. If the 'fsGroup' is specified as part of 'spec.introspector.serverPod.podSecurityContext', then the operator will use that 'fsGroup' instead of the default 'fsGroup'. Defaults to true. |
251252
| `waitForPvcToBind` | Boolean | Specifies whether the operator will wait for the PersistentVolumeClaim to be bound before proceeding with the domain creation. Defaults to true. |
252-
| `wdtModelEncryptionPassphraseSecret` | string | Specifies the secret name of the WebLogic Deployment Tool encryption passphrase if the WDT models provided in the 'domainCreationImages' or 'domainCreationConfigMap' are encrypted using the WebLogic Deployment Tool 'encryptModel' command. The secret must use the key 'passphrase' containing the actual passphrase for encryption. |
253253

254254
### Model
255255

documentation/site/content/managing-domains/domain-on-pv/usage.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ secret to decrypt the models for domain creation.
122122

123123
```yaml
124124
initializeDomainOnPV:
125-
wdtModelEncryptionPassphraseSecret: model-encryption-secret
125+
modelEncryptionPassphraseSecret: model-encryption-secret
126126
```
127127
128128
The secret must have a key `passphrase` containing the value of the WDT encryption passphrase used to encrypt the models.

integration-tests/src/test/java/oracle/weblogic/domain/InitializeDomainOnPV.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ public class InitializeDomainOnPV {
5656
+ "provided in the 'domainCreationImages' or 'domainCreationConfigMap' are encrypted using the "
5757
+ "WebLogic Deployment Tool 'encryptModel' command. "
5858
+ "The secret must use the key 'passphrase' containing the actual passphrase for encryption.")
59-
public String wdtModelEncryptionPassphraseSecret;
60-
59+
public String modelEncryptionPassphraseSecret;
60+
6161
public PersistentVolume getPersistentVolume() {
6262
return persistentVolume;
6363
}
@@ -112,12 +112,12 @@ public InitializeDomainOnPV setDefaultFsGroup(Boolean setDefaultFsGroup) {
112112
return this;
113113
}
114114

115-
public String getWdtModelEncryptionPassphraseSecret() {
116-
return wdtModelEncryptionPassphraseSecret;
115+
public String getModelEncryptionPassphraseSecret() {
116+
return modelEncryptionPassphraseSecret;
117117
}
118118

119-
public InitializeDomainOnPV wdtModelEncryptionPassphraseSecret(String wdtModelEncryptionPassphraseSecret) {
120-
this.wdtModelEncryptionPassphraseSecret = wdtModelEncryptionPassphraseSecret;
119+
public InitializeDomainOnPV modelEncryptionPassphraseSecret(String modelEncryptionPassphraseSecret) {
120+
this.modelEncryptionPassphraseSecret = modelEncryptionPassphraseSecret;
121121
return this;
122122
}
123123

@@ -129,7 +129,7 @@ public String toString() {
129129
.append("persistentVolumeClaim", persistentVolumeClaim)
130130
.append("domain", domain)
131131
.append("waitForPvcToBind", waitForPvcToBind)
132-
.append("wdtModelEncryptionPassphraseSecret", wdtModelEncryptionPassphraseSecret);
132+
.append("modelEncryptionPassphraseSecret", modelEncryptionPassphraseSecret);
133133

134134
return builder.toString();
135135
}
@@ -141,7 +141,7 @@ public int hashCode() {
141141
.append(persistentVolumeClaim)
142142
.append(domain)
143143
.append(waitForPvcToBind)
144-
.append(wdtModelEncryptionPassphraseSecret);
144+
.append(modelEncryptionPassphraseSecret);
145145

146146
return builder.toHashCode();
147147
}
@@ -161,7 +161,7 @@ public boolean equals(Object other) {
161161
.append(persistentVolumeClaim, rhs.persistentVolumeClaim)
162162
.append(domain, rhs.domain)
163163
.append(waitForPvcToBind, rhs.waitForPvcToBind)
164-
.append(wdtModelEncryptionPassphraseSecret, rhs.wdtModelEncryptionPassphraseSecret);
164+
.append(modelEncryptionPassphraseSecret, rhs.modelEncryptionPassphraseSecret);
165165

166166
return builder.isEquals();
167167
}

integration-tests/src/test/java/oracle/weblogic/kubernetes/ItSystemResOverrides.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,7 @@ private void createDomain() throws IOException {
456456
ItSystemResOverrides.class.getSimpleName());
457457
}
458458
configuration.getInitializeDomainOnPV()
459-
.wdtModelEncryptionPassphraseSecret(encryptionSecret)
459+
.modelEncryptionPassphraseSecret(encryptionSecret)
460460
.domain(new DomainOnPV()
461461
.createMode(CreateIfNotExists.DOMAIN)
462462
.domainCreationImages(Collections.singletonList(domainCreationImage))

kubernetes/crd/domain-crd.yaml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ apiVersion: apiextensions.k8s.io/v1
55
kind: CustomResourceDefinition
66
metadata:
77
annotations:
8-
weblogic.sha256: 0407ffe9beb7d54809e375d10378d614d066299f1533d885c8b97f056c94bf1a
8+
weblogic.sha256: 7af2914eff11dd15c13db2abe0271889e45e8f4127e89d6068ab11d91e39dfe6
99
name: domains.weblogic.oracle
1010
spec:
1111
group: weblogic.oracle
@@ -276,14 +276,6 @@ spec:
276276
type: object
277277
type: object
278278
type: object
279-
wdtModelEncryptionPassphraseSecret:
280-
description: Specifies the secret name of the WebLogic Deployment
281-
Tool encryption passphrase if the WDT models provided in
282-
the 'domainCreationImages' or 'domainCreationConfigMap'
283-
are encrypted using the WebLogic Deployment Tool 'encryptModel'
284-
command. The secret must use the key 'passphrase' containing
285-
the actual passphrase for encryption.
286-
type: string
287279
domain:
288280
description: Describes the configuration for creating an initial
289281
WebLogic Domain in persistent volume (`Domain in PV`). The
@@ -502,6 +494,14 @@ spec:
502494
type: object
503495
type: object
504496
type: object
497+
modelEncryptionPassphraseSecret:
498+
description: Specifies the secret name of the WebLogic Deployment
499+
Tool encryption passphrase if the WDT models provided in
500+
the 'domainCreationImages' or 'domainCreationConfigMap'
501+
are encrypted using the WebLogic Deployment Tool 'encryptModel'
502+
command. The secret must use the key 'passphrase' containing
503+
the actual passphrase for encryption.
504+
type: string
505505
setDefaultSecurityContextFsGroup:
506506
description: Specifies whether the operator will set the default
507507
'fsGroup' in the introspector job pod security context.

operator/src/main/java/oracle/kubernetes/operator/helpers/JobStepContext.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -239,8 +239,8 @@ String getRuntimeEncryptionSecretName() {
239239
return getDomain().getRuntimeEncryptionSecret();
240240
}
241241

242-
String getWdtModelEncryptionSecretName() {
243-
return getDomain().getWdtModelEncryptionSecret();
242+
String getModelEncryptionSecretName() {
243+
return getDomain().getModelEncryptionSecret();
244244
}
245245

246246
// ----------------------- step methods ------------------------------
@@ -612,9 +612,9 @@ protected V1PodSpec createPodSpec() {
612612
getOpssWalletFileSecretVolume()));
613613
}
614614

615-
if (getWdtModelEncryptionSecretVolume() != null) {
615+
if (getModelEncryptionSecretVolume() != null) {
616616
podSpec.addVolumesItem(new V1Volume().name(WDT_MODEL_ENCRYPTION_PASSPHRASE_VOLUME).secret(
617-
getWdtModelEncryptionSecretVolume()
617+
getModelEncryptionSecretVolume()
618618
));
619619
}
620620

@@ -741,7 +741,7 @@ protected V1Container createPrimaryContainer() {
741741
container.addVolumeMountsItem(readOnlyVolumeMount(OPSS_WALLETFILE_VOLUME, OPSS_WALLETFILE_MOUNT_PATH));
742742
}
743743

744-
if (getWdtModelEncryptionSecretVolume() != null) {
744+
if (getModelEncryptionSecretVolume() != null) {
745745
container.addVolumeMountsItem(readOnlyVolumeMount(WDT_MODEL_ENCRYPTION_PASSPHRASE_VOLUME,
746746
WDT_MODEL_ENCRYPTION_PASSPHRASE_MOUNT_PATH));
747747
}
@@ -901,10 +901,10 @@ private V1SecretVolumeSource getOpssWalletFileSecretVolume() {
901901
return null;
902902
}
903903

904-
private V1SecretVolumeSource getWdtModelEncryptionSecretVolume() {
905-
if (getWdtModelEncryptionSecretName() != null) {
904+
private V1SecretVolumeSource getModelEncryptionSecretVolume() {
905+
if (getModelEncryptionSecretName() != null) {
906906
V1SecretVolumeSource result = new V1SecretVolumeSource()
907-
.secretName(getWdtModelEncryptionSecretName())
907+
.secretName(getModelEncryptionSecretName())
908908
.defaultMode(420);
909909
result.setOptional(true);
910910
return result;

operator/src/main/java/oracle/kubernetes/weblogic/domain/model/DomainResource.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -453,8 +453,8 @@ public String getModelOpssWalletPasswordSecret() {
453453
* Reference to secret name of the wdt encryption passphrase for domain on pv.
454454
* @return wdt model encryption passphrase secret name
455455
*/
456-
public String getWdtModelEncryptionSecret() {
457-
return spec.getWdtModelEncryptionSecret();
456+
public String getModelEncryptionSecret() {
457+
return spec.getModelEncryptionSecret();
458458
}
459459

460460
/**

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -982,9 +982,9 @@ private String getModelOpssWalletFileSecret() {
982982
.orElse(null);
983983
}
984984

985-
String getWdtModelEncryptionSecret() {
985+
String getModelEncryptionSecret() {
986986
return Optional.ofNullable(getInitializeDomainOnPV())
987-
.map(InitializeDomainOnPV::getWdtModelEncryptionPassphraseSecret)
987+
.map(InitializeDomainOnPV::getModelEncryptionPassphraseSecret)
988988
.orElse(null);
989989
}
990990

operator/src/main/java/oracle/kubernetes/weblogic/domain/model/InitializeDomainOnPV.java

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public class InitializeDomainOnPV {
5656
+ "provided in the 'domainCreationImages' or 'domainCreationConfigMap' are encrypted using the "
5757
+ "WebLogic Deployment Tool 'encryptModel' command. "
5858
+ "The secret must use the key 'passphrase' containing the actual passphrase for encryption.")
59-
String wdtModelEncryptionPassphraseSecret;
59+
String modelEncryptionPassphraseSecret;
6060

6161
public PersistentVolume getPersistentVolume() {
6262
return persistentVolume;
@@ -112,12 +112,12 @@ public InitializeDomainOnPV setDefaultFsGroup(Boolean setDefaultFsGroup) {
112112
return this;
113113
}
114114

115-
public String getWdtModelEncryptionPassphraseSecret() {
116-
return wdtModelEncryptionPassphraseSecret;
115+
public String getModelEncryptionPassphraseSecret() {
116+
return modelEncryptionPassphraseSecret;
117117
}
118118

119-
public InitializeDomainOnPV wdtModelEncryptionPassphraseSecret(String wdtModelEncryptionPassphraseSecret) {
120-
this.wdtModelEncryptionPassphraseSecret = wdtModelEncryptionPassphraseSecret;
119+
public InitializeDomainOnPV modelEncryptionPassphraseSecret(String modelEncryptionPassphraseSecret) {
120+
this.modelEncryptionPassphraseSecret = modelEncryptionPassphraseSecret;
121121
return this;
122122
}
123123

@@ -129,6 +129,7 @@ public String toString() {
129129
.append("persistentVolumeClaim", persistentVolumeClaim)
130130
.append("domain", domain)
131131
.append("waitForPvcToBind", waitForPvcToBind)
132+
.append("modelEncryptionPassphraseSecret", modelEncryptionPassphraseSecret)
132133
.append("runDomainInitContainerAsRoot", runDomainInitContainerAsRoot);
133134

134135
return builder.toString();
@@ -141,6 +142,7 @@ public int hashCode() {
141142
.append(persistentVolumeClaim)
142143
.append(domain)
143144
.append(waitForPvcToBind)
145+
.append(modelEncryptionPassphraseSecret)
144146
.append(runDomainInitContainerAsRoot);
145147

146148
return builder.toHashCode();
@@ -161,7 +163,8 @@ public boolean equals(Object other) {
161163
.append(persistentVolumeClaim, rhs.persistentVolumeClaim)
162164
.append(domain, rhs.domain)
163165
.append(waitForPvcToBind, rhs.waitForPvcToBind)
164-
.append(wdtModelEncryptionPassphraseSecret, rhs.wdtModelEncryptionPassphraseSecret);
166+
.append(runDomainInitContainerAsRoot, rhs.runDomainInitContainerAsRoot)
167+
.append(modelEncryptionPassphraseSecret, rhs.modelEncryptionPassphraseSecret);
165168

166169
return builder.isEquals();
167170
}

0 commit comments

Comments
 (0)