Module Expr Str Import alias Import alias ImportFrom alias alias ImportFrom alias alias FunctionDef arguments args NameParam NameParam defaults body With Call NameLoad NameLoad Str NameStore body For NameStore Call AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr BinOpAdd Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad AttributeLoad NameLoad attr keyword Str Assign NameStore NameLoad TryExcept body Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore SubscriptLoad SubscriptLoad NameLoad Index Str Index Str Expr Call NameLoad NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr Call NameLoad NameLoad handlers ExceptHandler type NameLoad name NameStore body If CompareEq AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Num body Expr Call AttributeLoad NameLoad attr Str orelse Expr Call AttributeLoad NameLoad attr Str While NameLoad body TryExcept body Assign NameStore Dict Str Str Str NameLoad For NameStore Call AttributeLoad NameLoad attr keyword NameLoad body If CompareNotIn SubscriptLoad NameLoad Index Str ListLoad Str Str Str body Continue Assign NameStore SubscriptLoad NameLoad Index Str If CompareNotEq SubscriptLoad SubscriptLoad NameLoad Index Str Index Str Str body Continue Assign NameStore Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str Expr Call NameLoad NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr Call NameLoad NameLoad Assign NameStore SubscriptLoad SubscriptLoad NameLoad Index Str Index Str handlers ExceptHandler type NameLoad body Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Num decorator_list FunctionDef arguments args defaults body Expr Call NameLoad Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str keyword Str keyword Str Expr Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr Expr Call NameLoad NameLoad decorator_list If CompareEq NameLoad Str body Expr Call NameLoad
N/A N/A Watches Kubernetes for SSH keys and writes them to an authorized_keys file.

The remote builder uses SSH keys for authorizing users. Users with access to
the cluster can use the noel client to create a secret in Kubernetes containing
their SSH public key. This watches that secret and puts their public key into
the git users' authorized_keys file. This allows them push access to the
remote builder.
 N/A argparse N/A time noel.kubernetes Kubernetes KubernetesError noel.logger logger setup_logging write_authorized_keys_file N/A N/A keys destination N/A N/A N/A N/A open destination w f N/A N/A key N/A N/A keys values N/A N/A N/A N/A f write N/A N/A N/A key strip N/A run N/A N/A args N/A N/A N/A k8s N/A Kubernetes N/A args kubernetes_url namespace noel N/A resource_version None N/A N/A N/A secret N/A N/A k8s get_secret ssh-keys N/A keys N/A secret N/A data N/A resource_version N/A N/A secret N/A metadata N/A resourceVersion N/A N/A write_authorized_keys_file keys N/A args destination N/A N/A N/A logger info N/A N/A Wrote authorized keys. {} known keys. format N/A len keys N/A N/A N/A KubernetesError N/A e N/A N/A N/A N/A N/A N/A e httperror response status_code 404 N/A N/A N/A N/A logger warning No ssh keys found, will watch for more. N/A N/A N/A N/A logger exception Unexpected error while retrieving initial ssh keys. N/A True N/A N/A N/A N/A params N/A labelSelector resourceVersion type=ssh-keys resource_version N/A change N/A N/A k8s watch_secrets params params N/A N/A N/A N/A change N/A type N/A CREATED ADDED MODIFIED N/A N/A N/A secret N/A change N/A object N/A N/A N/A N/A secret N/A metadata N/A name ssh-keys N/A N/A N/A keys N/A N/A k8s decode_secret_data N/A secret N/A data N/A N/A write_authorized_keys_file keys N/A args destination N/A N/A N/A logger info N/A N/A Updated authorized keys. {} known keys. format N/A len keys N/A resource_version N/A N/A secret N/A metadata N/A resourceVersion N/A N/A N/A Exception N/A N/A N/A N/A logger exception Error while refreshing ssh keys, waiting 30 seconds. N/A N/A N/A time sleep 30 N/A main N/A N/A N/A N/A N/A N/A setup_logging N/A parser N/A N/A argparse ArgumentParser N/A N/A N/A parser add_argument --kubernetes-url default http://localhost:8001 help The URL for the Kubernetes API. N/A N/A N/A parser add_argument destination N/A args N/A N/A parser parse_args N/A N/A run args N/A N/A N/A __name__ __main__ N/A N/A N/A main