-
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
add openshift ex config patch to modify master-config.yaml #9165
Conversation
[test] |
LGTM |
[merge] |
+1 LGTM |
yum re[merge] |
When would I use this over improvements to the other patch? |
Two problems:
I figured on having an experimental command until we get everything sorted out in a few weeks and pick up changes in another rebase. |
To be fair, this is the Golang program that we can write to alleviate our block: package main
import (
"io/ioutil"
"os"
"gopkg.in/yaml.v2"
"github.com/openshift/origin/pkg/cmd/server/api/v1"
)
func main() {
var config v1.MasterConfig
rawInput, err := ioutil.ReadFile(os.Args[1])
if err != nil {
panic(err)
}
err = yaml.Unmarshal(rawInput, &config)
if err != nil {
panic(err)
}
config.AuditConfig.Enabled = true
rawOutput, err := yaml.Marshal(config)
if err != nil {
panic(err)
}
err = ioutil.WriteFile(os.Args[1]+".updated", rawOutput, os.O_WRONLY|O_CREATE)
if err != nil {
panic(err)
}
} |
yey! 👍 |
That's fine - I would expect though that the upstream patch command
replace this command.
|
Agreed. yum re[merge] |
Evaluated for origin test up to 5920c0b |
continuous-integration/openshift-jenkins/test SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/4496/) |
Evaluated for origin merge up to 5920c0b |
continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/4496/) (Image: devenv-rhel7_4324) |
Introduces
openshift ex config patch path/to/master-config.yaml --patch '{}'
to allow master config mutation without usingsed
. The scheme changes and patch flag additions may take us a little while to work out, this gives us a removable command to play with and see if it suits us.@fabianofranz
@soltysh @stevekuznetsov