-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
switch to using upstream patch cmd #20665
switch to using upstream patch cmd #20665
Conversation
7ec1083
to
c343357
Compare
Seems to be failing when I redirect final output to file: |
b4ff3c9
to
c343357
Compare
/test cmd |
9d2aba4
to
c343357
Compare
/hold |
abc4a42
to
4da9ee6
Compare
/hold cancel |
2082554
to
d51d369
Compare
/retest |
# Make oc use ${MASTER_CONFIG_DIR}/admin.kubeconfig, and ignore anything in the running user's $HOME dir | ||
export ADMIN_KUBECONFIG="${MASTER_CONFIG_DIR}/admin.kubeconfig" | ||
CLUSTER_ADMIN_CONTEXT=$(oc config view --config="${ADMIN_KUBECONFIG}" --flatten -o template --template='{{index . "current-context"}}'); export CLUSTER_ADMIN_CONTEXT | ||
${sudo} chmod -R a+rwX "${ADMIN_KUBECONFIG}" | ||
os::log::debug "To debug: export KUBECONFIG=$ADMIN_KUBECONFIG" | ||
|
||
cp "${SERVER_CONFIG_DIR}/master/master-config.yaml" "${SERVER_CONFIG_DIR}/master/master-config.orig.yaml" | ||
oc patch --config="${ADMIN_KUBECONFIG}" --local --type=json -o yaml -f "${SERVER_CONFIG_DIR}/master/master-config.orig.yaml" --patch="[{\"op\": "replace", \"path\": \"/etcdConfig/address\", \"value\": \"${API_HOST}:${ETCD_PORT}\"}]" | \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
none of these local calls should need a kubeconfig. Why do they seem to?
cmd/oc/oc.go
Outdated
@@ -7,7 +7,7 @@ import ( | |||
"runtime" | |||
"time" | |||
|
|||
"k8s.io/apiserver/pkg/util/logs" | |||
"k8s.io/kubernetes/pkg/api/legacyscheme" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this file should not be touched.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree this bit should not be touched, but we still need to install the configapi into kubectl's scheme, no?
looks like you need to update on top of my branch. I might squash the changes together. i wasn't expect a --config to be required. |
Will rebase with your branch. A --config was needed in order to avoid updating the upstream |
d51d369
to
16d8b1a
Compare
16d8b1a
to
b61a864
Compare
@deads2k per our conversation, will continue using |
@deads2k looks like I am no longer able to use the upstream patch command with Config types cat master-config.yaml | oc patch --local --type=json -o yaml -f - --patch="[{\"op\": \"replace\", \"path\": \"/imagePolicyConfig/maxImagesBulkImportedPerRepository\", \"value\": ${MAX_IMAGES_BULK_IMPORTED_PER_REPOSITORY:-5}}]"
error: unable to recognize "STDIN": no matches for kind "MasterConfig" in version "v1" |
/retest |
@juanvallejo please write a release note about removing the experimental patch in a future release. remove the hold once you have a release note written. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: deads2k, juanvallejo The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@deads2k Added release note: openshift/openshift-docs#10458 (comment) /hold cancel |
Work in progress...Depends on #20642
Picks kubernetes/kubernetes#67399
Diff between old and new master config patch (hack/lib/start.sh) using changes from this PR: http://www.mergely.com/0HlByqZs/
cc @soltysh @deads2k