-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Only copy credentials for the cloud used to deploy OCP #854
Only copy credentials for the cloud used to deploy OCP #854
Conversation
/hold We explicitly switched from go-yaml before (cc @abhinavdahiya). We are currently trying to get a critical set of patches in. |
Any examples? more info on why k8s uses ghodss https://github.com/kubernetes-sigs/yaml |
So, the config file generated by this would not serialize the keys as clientconfig expects them. The output is something like:
If there's something that one can set in ghodss to make it work as clientconfig expects, then I'm all for it. I may just lack of go-foo 😄 |
/test e2e-aws |
So looking at https://github.com/gophercloud/utils/blob/34f5991525d116b3832e0d9409492274f1c06bda/openstack/clientconfig/results.go
|
@abhinavdahiya thanks a lot for the info. I'll work with the Can we go with option 2 until the work on clientconfig is done? I'll put a task on me to clean this up as soon as the work in |
4fe7c4d
to
e93a02f
Compare
i'm fine with option 2 😇 |
e93a02f
to
a772eb1
Compare
cancelling the hold since @abhinavdahiya is ok with option 2 while I work on moving /hold cancel |
/hold The go-yaml repo suggests |
a772eb1
to
7d7cdce
Compare
@abhinavdahiya oh, totally missed that. Thanks! /hold cancel |
@@ -76,10 +83,15 @@ func (o *Openshift) Generate(dependencies asset.Parents) error { | |||
}, | |||
} | |||
case "openstack": | |||
clouds, err := clientconfig.LoadCloudsYAML() | |||
opts := new(clientconfig.ClientOpts) | |||
cloud, err := clientconfig.GetCloudFromYAML(opts) |
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.
Do we also need to modify https://github.com/openshift/installer/blob/master/pkg/asset/installconfig/openstack/openstack.go#L24 in a similar way?
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.
No, this is only relevant for the marshal step. The install config step should work just fine as it's all being done through clientconfig
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.
Ack thanks for clarifying
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: flaper87, hardys 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 |
Some yaml libraries use json tags to drive serialization for both, json and yaml. This patch adds json tags to the clientconfig's structs to support those libraries. The lack of these tags has caused some integration issues with other softare using packages like `ghodss/yaml`. An example of this can be found in the PR linked below: openshift/installer#854
* Add json tags to clientconfig's structs Some yaml libraries use json tags to drive serialization for both, json and yaml. This patch adds json tags to the clientconfig's structs to support those libraries. The lack of these tags has caused some integration issues with other softare using packages like `ghodss/yaml`. An example of this can be found in the PR linked below: openshift/installer#854 * Make format happy
We should copy only the cloud enabled by
OS_CLOUD
, rather than copying the entire clouds.yaml available in the node that runsopenshift-install
.In addition, this PR switches to use
go-yaml
rather thanghodss
as the former does not serialize the map keys properly. We should usego-yaml
, which is the same used byclientconfig
/cc @hardys @russellb