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

let components wait for LINSTOR API #275

Merged
merged 1 commit into from
Feb 25, 2022

Conversation

WanzenBug
Copy link
Member

@WanzenBug WanzenBug commented Feb 15, 2022

The HA Controller and CSI Driver can only run if the LINSTOR api is available.
To prevent an initial round of crashed containers, we add init containers with
the only purpose of waiting for the LINSTOR API to be available.

The used linstor-wait-until binary is included in the docker images itself, so
we don't need to add yet another image that needs to be configured.

@@ -676,8 +676,21 @@ func newCSINodeDaemonSet(csiResource *piraeusv1.LinstorCSIDriver) *appsv1.Daemon
Resources: csiResource.Spec.Resources,
}

linstorWaitNodeInitContainer := corev1.Container{
Name: "linstor-wait-node-online",
Image: csiResource.Spec.LinstorPluginImage,
Copy link
Member

Choose a reason for hiding this comment

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

Wouldn't it be better to use separate linstor-wait-until image for all components instead of putting its binary into the each component image?

Copy link
Member Author

Choose a reason for hiding this comment

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

Another image is another component that needs to be configured, another component that users might need to override/replace. then you have to do this weird song&dance with upgrade CRDs, because that's were they need to be configured, and you might need a default value somewhere in the operator.

so I just skip all that, put it into the containers that need to be downloaded in any case and be done with it.

Copy link
Collaborator

@JoelColledge JoelColledge left a comment

Choose a reason for hiding this comment

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

Looks good overall.

CHANGELOG.md Outdated Show resolved Hide resolved
The HA Controller and CSI Driver can only run if the LINSTOR api is available.
To prevent an initial round of crashed containers, we add init containers with
the only purpose of waiting for the LINSTOR API to be available.

The used linstor-wait-until binary is included in the docker images itself, so
we don't need to add yet another image that needs to be configured.

Signed-off-by: Moritz "WanzenBug" Wanzenböck <moritz.wanzenboeck@linbit.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants