Hey folks have a bit of mistery here. I have a con...
# kubernetes
d
Hey folks have a bit of mistery here. I have a container set up as development container for developers. When I exec into the container all env variables are there, but when I ssh into it (yes we have ssh set up for IDEs) half of the env variables are missing. What makes things especially interesting is that I have this set up in my manifest file:
Copy code
apiVersion: apps/v1
kind: Deployment
metadata:
  name: integration-agent
spec:
  selector:
    matchLabels:
      app: integration-agent
  strategy:
    type: Recreate # Because we are exposing ports
  template:
    metadata:
      labels:
        app: integration-agent
    spec:
      containers:
      - name: integration-agent
        image: {{ integration_agent_image }}
        resources:
          limits:
        env:
          - name: KUBE_HOST_IP
            valueFrom:
              fieldRef:
                fieldPath: status.hostIP
          - name: TEST_VAR
            value: test1
        envFrom:
          - secretRef:
              name: integration-agent-env-secret
Vars that are loaded using the
envFrom
using a secret generated with kustomizer secretgenerator are visible both when I exec and ssh into it but vars loaded directly with
env
are only visible when I exec into the container. Why is this the case?