-
Notifications
You must be signed in to change notification settings - Fork 63
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
let components wait for LINSTOR API #275
Conversation
af11626
to
0d0b043
Compare
0d0b043
to
0c965c0
Compare
@@ -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, |
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.
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?
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.
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.
0c965c0
to
018395f
Compare
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.
Looks good overall.
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>
018395f
to
8409883
Compare
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.