Open
Description
When an configuration value will be removed from func.yaml
, it will be not removed from the container environment context after a new deployment.
how-to-reproduce:
- add config val to
func.yaml
name: jhello
version: 0.0.24
runtime: java
cmd: com.example.fn.HelloFunction::handleRequest
build_image: fnproject/fn-java-fdk-build:jdk9-1.0.56
run_image: fnproject/fn-java-fdk:jdk9-1.0.56
format: http
config:
MY_ENV_VAL: test
and print out the envs e.g. in the java FDK:
package com.example.fn;
import java.util.stream.Collectors;
public class HelloFunction {
public String handleRequest(String input) {
return System.getenv().entrySet().stream().map(e -> e.getKey() + "=" + e.getValue()).collect(Collectors.joining(", "));
}
}
- deploy the function
fn --verbose deploy --app japp --local
curl http://localhost:8080/r/japp/jhello
response contains valueMY_ENV_VAL=test
- remove
MY_ENV_VAL: test
fromfunc.yaml
- deploy the function again:
fn --verbose deploy --app japp --local
curl http://localhost:8080/r/japp/jhello
response contains STILL the valueMY_ENV_VAL=test