Skip to content

Commit 15859cc

Browse files
committed
OWLS-70100 - Introspect: Remove admin secret mount from wl pods
1 parent 99fec13 commit 15859cc

File tree

2 files changed

+0
-19
lines changed

2 files changed

+0
-19
lines changed

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

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
import io.kubernetes.client.models.V1Pod;
2525
import io.kubernetes.client.models.V1PodSpec;
2626
import io.kubernetes.client.models.V1Probe;
27-
import io.kubernetes.client.models.V1SecretVolumeSource;
2827
import io.kubernetes.client.models.V1Status;
2928
import io.kubernetes.client.models.V1Volume;
3029
import io.kubernetes.client.models.V1VolumeMount;
@@ -184,10 +183,6 @@ String getIncludeServerOutInPodLog() {
184183

185184
abstract String getServerName();
186185

187-
private String getAdminSecretName() {
188-
return getDomain().getAdminSecret().getName();
189-
}
190-
191186
private List<V1PersistentVolumeClaim> getClaims() {
192187
return info.getClaims().getItems();
193188
}
@@ -581,10 +576,6 @@ protected V1PodSpec createSpec(TuningParameters tuningParameters) {
581576
createContainer(tuningParameters)
582577
.resources(getServerSpec().getResources())
583578
.securityContext(getServerSpec().getContainerSecurityContext()))
584-
.addVolumesItem(
585-
new V1Volume()
586-
.name(SECRETS_VOLUME)
587-
.secret(new V1SecretVolumeSource().secretName(getAdminSecretName())))
588579
.addVolumesItem(
589580
new V1Volume()
590581
.name(SCRIPTS_VOLUME)
@@ -647,7 +638,6 @@ private V1Container createContainer(TuningParameters tuningParameters) {
647638
.addPortsItem(new V1ContainerPort().containerPort(getPort()).protocol("TCP"))
648639
.lifecycle(createLifecycle())
649640
.addVolumeMountsItem(volumeMount(STORAGE_VOLUME, STORAGE_MOUNT_PATH))
650-
.addVolumeMountsItem(readOnlyVolumeMount(SECRETS_VOLUME, SECRETS_MOUNT_PATH))
651641
.addVolumeMountsItem(readOnlyVolumeMount(SCRIPTS_VOLUME, SCRIPTS_MOUNTS_PATH))
652642
.addVolumeMountsItem(readOnlyVolumeMount(DEBUG_CM_VOLUME, DEBUG_CM_MOUNTS_PATH))
653643
.readinessProbe(createReadinessProbe(tuningParameters.getPodTuning()))

operator/src/test/java/oracle/kubernetes/operator/helpers/PodHelperTestBase.java

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,6 @@ public abstract class PodHelperTestBase {
104104
private static final int CONFIGURED_PERIOD = 35;
105105
private static final String LOG_HOME = "/shared/logs";
106106
private static final String NODEMGR_HOME = "/u01/nodemanager";
107-
private static final String CREDENTIALS_VOLUME_NAME = "weblogic-credentials-volume";
108107
private static final String CONFIGMAP_VOLUME_NAME = "weblogic-domain-cm-volume";
109108
private static final String SIT_CONFIG_MAP_VOLUME_SUFFIX =
110109
"-weblogic-domain-introspect-cm-volume";
@@ -276,7 +275,6 @@ public void whenPodCreated_containerHasExpectedVolumeMounts() {
276275
writableVolumeMount("weblogic-domain-storage-volume", "/shared"),
277276
writableVolumeMount(
278277
UID + SIT_CONFIG_MAP_VOLUME_SUFFIX, "/weblogic-operator/introspector"),
279-
readOnlyVolumeMount("weblogic-credentials-volume", "/weblogic-operator/secrets"),
280278
readOnlyVolumeMount("weblogic-domain-debug-cm-volume", "/weblogic-operator/debug"),
281279
readOnlyVolumeMount("weblogic-domain-cm-volume", "/weblogic-operator/scripts")));
282280
}
@@ -418,13 +416,6 @@ public void whenDomainSpecifiesClaimName_podSpecUsesIt() {
418416
assertThat(storageVolume.getPersistentVolumeClaim().getClaimName(), equalTo("predefined"));
419417
}
420418

421-
@Test
422-
public void createdPod_hasCredentialsVolume() {
423-
V1Volume credentialsVolume = getVolumeWithName(getCreatedPod(), CREDENTIALS_VOLUME_NAME);
424-
425-
assertThat(credentialsVolume.getSecret().getSecretName(), equalTo(ADMIN_SECRET_NAME));
426-
}
427-
428419
@Test
429420
public void createdPod_hasConfigMapVolume() {
430421
V1Volume credentialsVolume = getVolumeWithName(getCreatedPod(), CONFIGMAP_VOLUME_NAME);

0 commit comments

Comments
 (0)