Skip to content
This repository has been archived by the owner on Oct 23, 2024. It is now read-only.

add bootstrap binary to manage IPs #94

Merged
merged 47 commits into from
May 11, 2020
Merged

add bootstrap binary to manage IPs #94

merged 47 commits into from
May 11, 2020

Conversation

zmalik
Copy link
Contributor

@zmalik zmalik commented Apr 29, 2020

This PR

  • add bootstrap logic to maintain the IPs list in a CM
  • adds unit tests for some functions in the bootstrap code
  • adds KUTTL tests as integration tests for the bootstrap logic

@zmalik zmalik added the wip label Apr 29, 2020
@zmalik zmalik force-pushed the zain/cluster-cm branch 3 times, most recently from 76fd5d0 to 9144a18 Compare May 4, 2020 15:26
@zmalik zmalik marked this pull request as ready for review May 4, 2020 16:44
@zmalik zmalik requested review from ANeumann82 and nfnt May 4, 2020 16:44
@zmalik zmalik removed the wip label May 5, 2020
@zmalik zmalik requested a review from ANeumann82 May 7, 2020 08:17
Signed-off-by: Zain Malik <[email protected]>
Copy link
Contributor

@ANeumann82 ANeumann82 left a comment

Choose a reason for hiding this comment

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

A couple of small nits, but nothing serious. lgtm!

images/bootstrap/main.go Outdated Show resolved Hide resolved
images/bootstrap/pkg/service/cassandra.go Outdated Show resolved Hide resolved
images/bootstrap/pkg/service/cassandra.go Outdated Show resolved Hide resolved
images/bootstrap/pkg/service/cassandra.go Outdated Show resolved Hide resolved
images/bootstrap/pkg/service/cm_lock.go Outdated Show resolved Hide resolved
images/bootstrap/pkg/service/cassandra.go Outdated Show resolved Hide resolved
images/bootstrap/pkg/service/cassandra.go Outdated Show resolved Hide resolved
images/bootstrap/pkg/service/cassandra.go Outdated Show resolved Hide resolved
images/bootstrap/pkg/service/cm_lock.go Outdated Show resolved Hide resolved
Comment on lines 41 to 43
if cfg.Annotations == nil {
return nil, fmt.Errorf("configmap %s has no annotations", configmap)
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this an error that needs to be specifically handled?

I'd probably just maek the next line if cfg.Annotations != nil && cfg.Annotations[ANNOTATION_LOCK] == pod

But it may be an actual unexpected state

@zmalik zmalik merged commit 27a703b into master May 11, 2020
@zmalik zmalik deleted the zain/cluster-cm branch May 11, 2020 14:52
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants