-
Notifications
You must be signed in to change notification settings - Fork 21
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 kafka api #998
Add kafka api #998
Conversation
Signed-off-by: raihankhan <[email protected]>
Signed-off-by: raihankhan <[email protected]>
Signed-off-by: raihankhan <[email protected]>
Signed-off-by: raihankhan <[email protected]>
Signed-off-by: raihankhan <[email protected]>
Signed-off-by: raihankhan <[email protected]>
Signed-off-by: raihankhan <[email protected]>
Signed-off-by: raihankhan <[email protected]>
Signed-off-by: raihankhan <[email protected]>
Signed-off-by: raihankhan <[email protected]>
apis/kubedb/v1alpha2/constants.go
Outdated
KafkaControllerListenersName = "controller.listener.names" | ||
KafkaInterBrokerListener = "inter.broker.listener.name" | ||
KafkaNodeRole = "process.roles" | ||
ClusterID = "cluster.id" |
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.
KafkaClusterID
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.
refactored
} | ||
|
||
func (k *Kafka) StandbyServiceName() string { | ||
return meta_util.NameWithPrefix(k.ServiceName(), "standby") |
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.
Add a constant for "standby" ?
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.
Sounds good. Added.
Storage *core.PersistentVolumeClaimSpec `json:"storage,omitempty"` | ||
|
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.
Lets add EphemeralStorage too.
EphemeralStorage *core.EmptyDirVolumeSource
json:"ephemeralStorage,omitempty"``
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.
EphemeralStorage is handled with storage type. For now, It's not needed.
err := k.ValidateCreateOrUpdate() | ||
if err != nil { | ||
return err | ||
} | ||
return nil | ||
} |
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.
just returning k.ValidateCreateOrUpdate()
would be enough.
Same for the below function
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.
fixed
return nil | ||
} | ||
|
||
func (k *Kafka) ValidateCreateOrUpdate() 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.
We also need to validate storage related stuffs.
Check this https://github.com/kubedb/mongodb/blob/master/pkg/admission/validator.go#L325
Signed-off-by: raihankhan <[email protected]>
Signed-off-by: raihankhan <[email protected]>
// +optional | ||
Deprecated bool `json:"deprecated,omitempty"` | ||
// PSP names | ||
PodSecurityPolicies KafkaVersionPodSecurityPolicy `json:"podSecurityPolicies"` |
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.
make it optional
Signed-off-by: Tamal Saha [email protected]