We need to pass a HTTP Header to fetch the jarURI ...
# troubleshooting
m
We need to pass a HTTP Header to fetch the jarURI in order to be able to fetch jars that are in a private repository/registry.
Copy code
apiVersion: flink.apache.org/v1beta1
kind: FlinkSessionJob
metadata:
  name: flink-playground-session-job
spec:
  flinkConfiguration:
    kubernetes.operator.user.artifacts.http.header: "Authorization Bearer: <value from secret or env variable>"

  job:
    jarURI: https://repo1.maven.org/maven2/org/apache/flink/flink-examples-streaming_2.12/1.16.1/flink-examples-streaming_2.12-1.16.1-TopSpeedWindowing.jar
Here I want the value of
kubernetes.operator.user.artifacts.http.header
to be read from a Kubernetes Secret. Is this somehow possible?
g
In general passing operator configs from secrets is not possible at the moment. (In Flink or the Operator)
m
Is there a solution in your mind to achieve what we want? Right now as a workaround we have a proxy between flink and the registry which allows flink to connect, but this introduces a single point of failure
g
You could have an init container for the operator that creates the configmap of the operator configuration
Or something along those lines. Not a great solution but it鈥檚 something
m
That unfortunately does not work for our Usecase as the Flink Operator is not only used by us and we would basically expose our secrets to other teams 馃槃 But okay, i understand that it is not possible. We will then just stick with the nginx proxy in the middle until we come up with something better 馃檭 thanks!
g
We have some other configs in the operator that can be configured via env variables. You could add a ticket to support that in this particular case as well
If there is a common use case it probably makes sense
It鈥檚 also a simple contribution to make ;)
o
Hi guys, I have a similar scenario for injecting datadog api key secret in flinkConfiguration in order to setup Datadog Reporter. Sorry if I missed this, but is there any workaround to the above at the moment?
I found this PR: https://github.com/apache/flink/pull/19684 which seems like it will solve our issue, any chance we could merge this please ? 馃檹
cc @Jo茫o Cardoso
馃檶 1