origin: envFrom not working in Lifecycle hooks
When creating a lifecycle hook using the Recreate deploy strategy and a envFrom is used in the execNewPod hook type, the values are not picked up when the hook pod is deployed.
Version
oc v3.10.127 kubernetes v1.10.0+b81c8f8 features: Basic-Auth
Server https://openshift openshift v3.11.188 kubernetes v1.11.0+d4cacc0
Steps To Reproduce
Create a deployment with a mid lifecycle hook that specifies a envFrom.secretRef. When the mid hook is deployed the secrets will not be in the container.
strategy:
type: Recreate
recreateParams:
mid:
failurePolicy: Abort
execNewPod:
command:
- /bin/sh
- '-c'
- >-
cd /app &&
/usr/bin/dotnet Test.dll arg1
containerName: Test
env:
- name: ASPNETCORE_ENVIRONMENT
value: Production
envFrom:
- secretRef:
name: TestSecret
volumes:
- data
Current Result
envFrom secretRef is not picked up in the container
Expected Result
envFrom secretRef should work as it does in a normal container configuration or it should inherit the envs from the container spec it is created from.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 1
- Comments: 30 (16 by maintainers)
@Elkasitu Sure šš¼
This really bloats the configuration, mapping should be the same as with the regular deployment.
Iām also interested in a solution for this problem.
Also being impacted by this issue, @lomholdt would you mind reopening the issue?
/remove-lifecycle rotten
/remove-lifecycle stale