Skip to content
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

Merged
merged 17 commits into from
Dec 11, 2022
Merged

Add kafka api #998

merged 17 commits into from
Dec 11, 2022

Conversation

tamalsaha
Copy link
Member

Signed-off-by: Tamal Saha [email protected]

kodiak-appscode[bot]
kodiak-appscode bot previously approved these changes Nov 22, 2022
@tamalsaha tamalsaha added the automerge Kodiak will auto merge PRs that have this label label Nov 22, 2022
@tamalsaha tamalsaha requested a review from faem November 22, 2022 15:08
@tamalsaha tamalsaha removed the automerge Kodiak will auto merge PRs that have this label label Nov 22, 2022
kodiak-appscode[bot]
kodiak-appscode bot previously approved these changes Nov 23, 2022
kodiak-appscode[bot]
kodiak-appscode bot previously approved these changes Nov 24, 2022
kodiak-appscode[bot]
kodiak-appscode bot previously approved these changes Nov 24, 2022
kodiak-appscode[bot]
kodiak-appscode bot previously approved these changes Nov 25, 2022
kodiak-appscode[bot]
kodiak-appscode bot previously approved these changes Nov 28, 2022
kodiak-appscode[bot]
kodiak-appscode bot previously approved these changes Dec 6, 2022
kodiak-appscode[bot]
kodiak-appscode bot previously approved these changes Dec 6, 2022
kodiak-appscode[bot]
kodiak-appscode bot previously approved these changes Dec 7, 2022
kodiak-appscode[bot]
kodiak-appscode bot previously approved these changes Dec 7, 2022
kodiak-appscode[bot]
kodiak-appscode bot previously approved these changes Dec 7, 2022
kodiak-appscode[bot]
kodiak-appscode bot previously approved these changes Dec 7, 2022
kodiak-appscode[bot]
kodiak-appscode bot previously approved these changes Dec 9, 2022
kodiak-appscode[bot]
kodiak-appscode bot previously approved these changes Dec 9, 2022
Signed-off-by: raihankhan <[email protected]>
kodiak-appscode[bot]
kodiak-appscode bot previously approved these changes Dec 9, 2022
KafkaControllerListenersName = "controller.listener.names"
KafkaInterBrokerListener = "inter.broker.listener.name"
KafkaNodeRole = "process.roles"
ClusterID = "cluster.id"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

KafkaClusterID

Copy link
Contributor

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")
Copy link
Member

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" ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good. Added.

apis/kubedb/v1alpha2/kafka_helpers.go Show resolved Hide resolved
apis/kubedb/v1alpha2/kafka_helpers.go Show resolved Hide resolved
Comment on lines +71 to +72
Storage *core.PersistentVolumeClaimSpec `json:"storage,omitempty"`

Copy link
Member

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"``

Copy link
Contributor

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.

Comment on lines 63 to 68
err := k.ValidateCreateOrUpdate()
if err != nil {
return err
}
return nil
}
Copy link
Member

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

Copy link
Contributor

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 {
Copy link
Member

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

kodiak-appscode[bot]
kodiak-appscode bot previously approved these changes Dec 10, 2022
Signed-off-by: raihankhan <[email protected]>
@faem faem added the automerge Kodiak will auto merge PRs that have this label label Dec 11, 2022
@kodiak-appscode kodiak-appscode bot merged commit 69bc9de into master Dec 11, 2022
@kodiak-appscode kodiak-appscode bot deleted the kafka branch December 11, 2022 04:49
// +optional
Deprecated bool `json:"deprecated,omitempty"`
// PSP names
PodSecurityPolicies KafkaVersionPodSecurityPolicy `json:"podSecurityPolicies"`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make it optional

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge Kodiak will auto merge PRs that have this label
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants