Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix conflit secret error #165

Merged
merged 1 commit into from
Jun 23, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions paddlecloud/notebook/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,10 +195,11 @@ def create_user_namespace(username):
"metadata": {
"name": user_namespace
}})
#create DataCenter sercret if not exists
secrets = v1api.list_namespaced_secret(user_namespace)
secret_names = [item.metadata.name for item in secrets.items]
for dc, cfg in settings.DATACENTERS.items():
#create DataCenter sercret if not exists
secrets = v1api.list_namespaced_secret(user_namespace)
secret_names = [item.metadata.name for item in secrets.items]

# create Kubernetes Secret for ceph admin key
if cfg["fstype"] == "cephfs" and cfg["secret"] not in secret_names:
with open(cfg["admin_key"], "r") as f:
Expand Down