oc login should avoid clobbering kubeconfig contexts
Maintainer thường phản hồi trong vòng 1 ngày
Đánh giá
Issue này chưa được đánh giá.
Mô tả
Default behavior of oc login https://openshift.example.com --username=thelonelyghost --password='hunter2' is to do the following:
- Setup a new (or if exists, update) cluster in the kubeconfig by the name of
openshift-example-com:443 - Setup a new (or if exists, update) user in the kubeconfig by the name of
thelonelyghost/openshift-example-com:443 - Setup a new (or if exists, update) context in the kubeconfig by the name of
default/openshift-example-com:443/thelonelyghost. - Set the current context to be
default/openshift-example-com:443/thelonelyghost
This is fine for initial setup, but periodically I'm forced to login again to refresh the bearer token stored in the user section of the kubeconfig. When I do that, I must run the same oc login command again. Here's the problem:
If I re-run that command, it clobbers any changes I've made to human-facing names of the cluster, the context, or the user that have zero functional effect on the file. If I renamed the default/openshift-example-com:443/thelonelyghost context to be more user-friendly, such as company-prod, logging in again adds an additional context of default/openshift-example-com:443/thelonelyghost back again. It does not update credentials in-place, it adds them if they're not named exactly what is expected.
I've written a tool in python named oc-replacement to re-authenticate in-place as I desire, but it would be much more desirable for this to be default behavior or even an option with the oc command line tool.
- Ngôn ngữ chính
- Go
- Star
- 250
- Fork
- 491
- Merge trung bình
- 9 ngày 3 giờ
- Pull request đã merge (30 ngày)
- 10
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của openshift/oc
-
tide/merge-blocker
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 1/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 52/100
openshift/oc#2443 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Context completion panics in ListContextsInConfig, including oc 4.22.15Có thể đã có người làm @NewtonChutney đã nhận 23 ngày trước. Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 38/100
openshift/oc#2424 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
kind/bug priority/important-soon
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 58/100
openshift/oc#2393 · 4 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
google/go-containerregistry#2491 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
aiac enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
phase:v1 type:harness
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
scttfrdmn/burroughs#1181 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
compiler-explorer/ce-ci#28 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
Maintainer thường phản hồi trong vòng 1 ngày