Skip to content

Commit

Permalink
Fix #1205: change the warn message in case of env variables not bound
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolaferraro committed Feb 21, 2020
1 parent 2608d83 commit b8cd437
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/trait/container.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,9 @@ func (t *containerTrait) Apply(e *Environment) error {
case env.ValueFrom.FieldRef != nil && env.ValueFrom.FieldRef.FieldPath == "metadata.namespace":
envvar.SetVar(&container.Env, corev1.EnvVar{Name: env.Name, Value: e.Integration.Namespace})
case env.ValueFrom.FieldRef != nil:
t.L.Infof("Environment variable %s uses fieldRef and cannot be set on a Knative service", env.Name)
t.L.Infof("Skipping environment variable %s (fieldRef)", env.Name)
case env.ValueFrom.ResourceFieldRef != nil:
t.L.Infof("Environment variable %s uses resourceFieldRef and cannot be set on a Knative service", env.Name)
t.L.Infof("Skipping environment variable %s (resourceFieldRef)", env.Name)
default:
envvar.SetVar(&container.Env, env)
}
Expand Down

0 comments on commit b8cd437

Please sign in to comment.