-
Notifications
You must be signed in to change notification settings - Fork 106
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
liqoctl: add identity command #2216
base: network-external
Are you sure you want to change the base?
Conversation
Hi @aleoli. Thanks for your PR! I am @adamjensenbot.
Make sure this PR appears in the liqo changelog, adding one of the following labels:
|
c281dd6
to
3c6ccec
Compare
6ea7c08
to
ee112fe
Compare
ab6cc4e
to
3ff8a74
Compare
ee112fe
to
28b1d7e
Compare
// output implements the logic to output the generated Configuration resource. | ||
func (o *Options) output(conf *corev1.Secret) error { | ||
var outputFormat string | ||
switch { | ||
case o.generateOptions != nil: | ||
outputFormat = o.generateOptions.OutputFormat | ||
default: | ||
return fmt.Errorf("unable to determine output format") | ||
} | ||
var printer printers.ResourcePrinter | ||
switch outputFormat { | ||
case yamlLabel: | ||
printer = &printers.YAMLPrinter{} | ||
case jsonLabel: | ||
printer = &printers.JSONPrinter{} | ||
default: | ||
return fmt.Errorf("unsupported output format %q", outputFormat) | ||
} | ||
|
||
return printer.PrintObj(conf, os.Stdout) | ||
} |
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 should be moved in generate.go or types.go
9332f58
to
bc50dc7
Compare
3485350
to
2ab14ae
Compare
Description
This pr implements the
generate
and theupdate
APIs for certificate rotation. It also restarts pods that are using the certificate.Now, you can use the
liqoctl generate identity
command on a cluster and apply the output to the other one.Note: if the certificate is expired you probably need to update certificates in both directions (applying this couple of commands twice, starting from different clusters)
How Has This Been Tested?