Skip to content

Commit

Permalink
Merge pull request #83 from LamaAni/fix_change_new_airflow_token_mapping
Browse files Browse the repository at this point in the history
Fixed bearer token markup for old/new airflow
  • Loading branch information
LamaAni authored Dec 23, 2022
2 parents b6b6f66 + d63fe04 commit bd3828a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion airflow_kubernetes_job_operator/kube_api/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,9 @@ def load_in_cluster():

configuration.host = loader.host
configuration.ssl_ca_cert = loader.ssl_ca_cert
configuration.api_key["authorization"] = "bearer " + loader.token
configuration.api_key["authorization"] = (
loader.token if loader.token.lower().strip().startswith("bearer ") else "bearer " + loader.token
)
default_namespace_file = os.path.join(DEFAULT_SERVICE_ACCOUNT_PATH, "namespace")
if os.path.exists(default_namespace_file):
with open(default_namespace_file, "r") as raw:
Expand Down

0 comments on commit bd3828a

Please sign in to comment.