Skip to content

Commit

Permalink
chore: pass secret mounts to init container for runtime secret manage…
Browse files Browse the repository at this point in the history
…ment (#13524)
  • Loading branch information
tryangul committed Aug 14, 2024
1 parent ddb1e63 commit 4cbb732
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,16 +69,17 @@ class ConnectorPodFactory(
}

val connectorResourceReqs = KubePodProcess.getResourceRequirementsBuilder(connectorReqs).build()
val internalVolumeMounts = volumeMounts + secretVolumeMounts

val init: Container =
if (useFetchingInit) {
initContainerFactory.createFetching(connectorResourceReqs, volumeMounts, runtimeEnvVars)
initContainerFactory.createFetching(connectorResourceReqs, internalVolumeMounts, runtimeEnvVars)
} else {
initContainerFactory.createWaiting(connectorResourceReqs, volumeMounts)
initContainerFactory.createWaiting(connectorResourceReqs, internalVolumeMounts)
}

val main: Container = buildMainContainer(connectorResourceReqs, volumeMounts, kubePodInfo.mainContainerInfo, runtimeEnvVars)
val sidecar: Container = buildSidecarContainer(volumeMounts + secretVolumeMounts)
val sidecar: Container = buildSidecarContainer(internalVolumeMounts)

// TODO: We should inject the scheduler from the ENV and use this just for overrides
val schedulerName = featureFlagClient.stringVariation(UseCustomK8sScheduler, Connection(ANONYMOUS))
Expand Down

0 comments on commit 4cbb732

Please sign in to comment.