-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
skaffold verify
ignores container environment variables on local minikube cluster
#8974
Comments
Hi @ritsuki1227 , to use
run |
@ericzzzzzzz Thank you for sharing, it helps me a lot. Does it mean that if I deploy a Configmap or Secret by skaffold and set these values as environment variables in a container in the Kubertes Job manafest, they will be ignored by |
Yes! Skaffold currently completely overrides apiVersion: skaffold/v4beta6
kind: Config
metadata:
name: foo
verify:
- name: foo
container:
name: foo
image: alpine:latest
command: ["sh", "-c", "echo env var is: $FOO"]
env:
- name: FOO
value: foo
executionMode:
kubernetesCluster:
jobManifestPath: job.yaml related code. skaffold/pkg/skaffold/verify/k8sjob/verify.go Line 378 in 3b1aabc
it seems a little strange to me, but I don't have any more context. Sorry. |
Updated, we're currently discussing about how we want to handle this case. In the meantime, you can use configure something like related schema https://skaffold.dev/docs/references/yaml/#customActions-executionMode-kubernetesCluster-overrides |
When I run
skaffold verify
with the following manifests, an environment variable will be ignored on my local minikube cluster.Information
skaffold.yaml:
job.yaml:
v2.6.2
v1.31.1
macOS 11.5.1
Homebrew
Expected behavior
Result of the echo:
env var is: foo
Actual behavior
Result of the echo:
env var is:
Steps to reproduce the behavior
The text was updated successfully, but these errors were encountered: