-
Notifications
You must be signed in to change notification settings - Fork 4.7k
make openshift start --write-config take a dir #1737
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
make openshift start --write-config take a dir #1737
Conversation
2e61232
to
2ccd6fa
Compare
[test] |
continuous-integration/openshift-jenkins/test FAILURE (https://ci.openshift.redhat.com/jenkins/job/test_pull_requests_openshift3/1912/) |
@deads2k thanks. concept/intention looks good to me. |
--signer-serial="${MASTER_CONFIG_DIR}/ca.serial.txt" | ||
|
||
# create openshift config | ||
openshift start \ |
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.
why do this in addition to create-master-certs / create-node-config?
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.
Creates the master config pointing to certs in a non-default location.
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.
so are we expecting all the certs to exist already? if so, should we do --create-certs=false
so we know if create-master-certs
and create-node-config
didn't make enough things to satisfy openshift start
? same comment in other test scripts that use this setup pattern, I guess
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.
When running with a config file, certs are never created.
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.
we're not running from config here, we're writing it... wouldn't that generate the certs if missing?
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.
ah, just got down to where you removed certargs
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.
nevermind... --create-certs is just a raw boolean now... think we should pass --create-certs=false
here?
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.
Refresh your diff. Got that a couple commits ago.
2ccd6fa
to
194ee2c
Compare
comments so far addressed. |
--hostnames="${SERVER_HOSTNAME_LIST}" \ | ||
--master="${MASTER_ADDR}" \ | ||
--public-master="${API_SCHEME}://${PUBLIC_MASTER_HOST}" | ||
|
||
openshift admin create-node-config \ | ||
--listen="${KUBELET_SCHEME}://0.0.0.0:${KUBELET_PORT}" \ | ||
--node-dir="${CERT_DIR}/node-${KUBELET_HOST}" \ | ||
--node-dir="${NODE_CONFIG_DIR}/node-${KUBELET_HOST}" \ |
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.
NODE_CONFIG_DIR
already includes node-${KUBELET_HOST}
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.
looking to see why this didn't break the test.
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.
ah, consistently wrong.
comments so far addressed. |
} | ||
|
||
func getCleanAllInOneConfigDir() string { | ||
cleanupMasterConfigDir() |
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.
cleanupNodeConfigDirs()
?
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.
To me, @liggitt comment here makes sense, any reason why its not called?
if err := nodeOptions.RunNode(); err != nil { | ||
return err | ||
} | ||
|
||
if o.WriteConfigOnly { | ||
if o.ConfigDir.Provided() { |
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.
use writeConfigOnly
Other things I found:
|
flags.BoolVar(&options.WriteConfigOnly, "write-config", false, "Indicates that the command should build the configuration from command-line arguments, write it to the locations specified by --master-config and --node-config, and exit.") | ||
flags.StringVar(&options.MasterConfigFile, "master-config", "", "Location of the master configuration file to run from, or write to (when used with --write-config). When running from configuration files, all other command-line arguments are ignored.") | ||
flags.StringVar(&options.NodeConfigFile, "node-config", "", "Location of the node configuration file to run from, or write to (when used with --write-config). When running from configuration files, all other command-line arguments are ignored.") | ||
flags.Var(&options.ConfigDir, "write-config", "Directory to write an intial config into. After writing, exit without starting the server.") |
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.
s/intial/initial/
that's all the comments I have... once those are done and tests pass, squash, and coordinate with @sdodson on merge timing. should also probably email the devlist once it's in the merge queue |
781c598
to
79bb37e
Compare
Also queue up a doc PR to fix up http://docs.openshift.org/latest/dev_guide/master_node_configuration.html |
(and probably other places in doc that reference openshift.local.certificates, etc) |
79bb37e
to
7e953e3
Compare
7e953e3
to
b2b69cc
Compare
@derekwaynecarr care to do a final check? |
[merge] |
continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/merge_pull_requests_openshift3/1697/) (Image: devenv-fedora_1376) |
b2b69cc
to
40be29b
Compare
bad rebase in dns test. re[merge] |
Evaluated for origin up to 40be29b |
Merged by openshift-bot
This changes the
--write-config
parameter to take a directory (instead of boolean). It eliminates--cert-dir
and always creates the certs directly in the config directory.Since it is a single directory, the master config dir can be bundled up as a secret for use in a pod.
@liggitt review
@sdodson fyi