-
Notifications
You must be signed in to change notification settings - Fork 40k
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
Provide flags to use etcd3 backed storage #24455
Conversation
DeserializationCacheSize int | ||
} | ||
|
||
func (c *ETCDStorageConfig) NewStorage() (storage.Interface, error) { |
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.
Shouldn't we be passing back storage.Interface here?
- please add Factory to denote operation. Which is consistent in other places in the codebase.
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.
Changing the type name like I suggest should be OK. This method could optionally be called Construct, New, Build, or it's OK as is.
Minor comments for now, feel free to ping me when it's ready. |
@@ -204,6 +204,7 @@ func (s *APIServer) AddFlags(fs *pflag.FlagSet) { | |||
fs.StringVar(&s.AuthorizationConfig.WebhookConfigFile, "authorization-webhook-config-file", s.AuthorizationConfig.WebhookConfigFile, "File with webhook configuration in kubeconfig format, used with --authorization-mode=Webhook. The API server will query the remote service to determine access on the API server's secure port.") | |||
fs.StringVar(&s.AdmissionControl, "admission-control", s.AdmissionControl, "Ordered list of plug-ins to do admission control of resources into cluster. Comma-delimited list of: "+strings.Join(admission.GetPlugins(), ", ")) | |||
fs.StringVar(&s.AdmissionControlConfigFile, "admission-control-config-file", s.AdmissionControlConfigFile, "File with admission control configuration.") | |||
fs.StringSliceVar(&s.EtcdConfig.Type, "--storage-backend", s.EtcdConfig.Type, "The storage backend for persistent states") |
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 one is going to understand that description. At a minimum list all the valid options?
Sorry for the delay. |
StorageTypeETCD2 = "etcd2" | ||
StorageTypeETCD3 = "etcd3" | ||
) | ||
|
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.
probably
type StorageType string
then use this type to define etcd2, etcd3, etc..
@timothysc @lavalamp |
Rebased and addressed comments |
Rebased and squashed |
|
||
// Config is configuration for creating a storage backend. | ||
type Config struct { | ||
Type string |
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.
Please add comments to all the fields here - those aren't obvious for people who didn't touch this code.
@wojtek-t |
405472c
to
55ca7c1
Compare
GCE e2e build/test passed for commit c0071a1. |
Squashed and all tests are green |
@k8s-bot test this [submit-queue is verifying that this PR is safe to merge] |
GCE e2e build/test passed for commit c0071a1. |
Automatic merge from submit-queue |
@hongchaodeng Does this PR require action by the user when upgrading to 1.3.0? (Think about non-developer users.) If so, please edit your first comment to have a release-note block, like in #28132. If it is just an optional feature, please change the label to just release-note. |
@erictune Fixed the label. |
No action required from user when upgrading to v1.3.0
ref: #24405
What's in this PR?