Skip to content

Commit 5248c67

Browse files
authored
Add some more information and examples to the image selection documentation (#445)
* WIP version of reworded image selection process * Added some more detail to the image selection docs. * Addressed review comments. * Addressed comments from Sebastian.
1 parent ab86517 commit 5248c67

File tree

1 file changed

+119
-3
lines changed

1 file changed

+119
-3
lines changed

modules/concepts/pages/product_image_selection.adoc

Lines changed: 119 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,50 @@ Containers require images (e.g. Docker) to run of.
77
These images contain different tools for initialization jobs and/or the actual product itself.
88
Images are prepared for different architectures and different product versions.
99

10-
There are multiple ways to specify the image used:
10+
Stackable uses two separate versions to describe the images that are provided as part of the platform:
11+
12+
13+
**Product version** +
14+
This is the version of the product which this image provides, so this could for example be Kafka 3.3.1
15+
16+
**Stackable version** +
17+
This version is used to track changes to the structure of the image containing the product (in the version specified by _product version_).
18+
Stackable operators expect to find a very specific structure in the images they use to roll out the products.
19+
This can be things like startup scripts being present, parameters these startup scripts expect, presence or location of extra libraries and similar things.
20+
In order for our operators to work as intended every operator has to be used with images from the same release line as this operator.
21+
22+
What this means is, that for example the Stackable Operator for Apache HBase will by default try to use images with the same Stackable version, the following table shows a few examples to make this clearer:
23+
24+
25+
|===
26+
|Operator version |HBase version |Image
27+
28+
|23.4.0
29+
|3.3.0
30+
|hbase:3.3.0-stackable23.4.0
31+
32+
|23.4.0
33+
|3.3.1
34+
|hbase:3.3.1-stackable23.4.0
35+
36+
|23.7.0
37+
|3.3.0
38+
|hbase:3.3.0-stackable23.7.0
39+
40+
|23.7.0
41+
|3.3.1
42+
|hbase:3.3.1-stackable23.7.0
43+
|===
44+
45+
46+
However, since the last digit of the Stackable version is considered to be a patchlevel indicator, operators will be compatible with all images from the same release line.
47+
So an operator of version _23.4.x_ will be compatible with all images of version _23.4.y_.
48+
This is intended to allow shorter update cycles for users, when new image versions are released that may contain security fixes - should the user so choose.
49+
50+
51+
The following paragraphs explain the available settings and how they work.
52+
53+
At the bottom of this page in the <<_common_scenarios, common scenarios>> section some common update scenarios are explained as examples.
1154

1255
== Stackable provided images
1356

@@ -17,7 +60,7 @@ If the Kubernetes cluster does not have internet access, a xref:_custom_docker_r
1760
Currently, you need to specify the product version. This can be found on the xref:operators:supported_versions.adoc[list of supported product versions] or on the website of the product itself.
1861
This requirement might be relaxed in the future, as every platform release will ship wth a recommended product versions, which will be used by default.
1962

20-
Additionally you can specify the Stackable version: As we need to make changes to the Images from time to time (e.g. security updates), we also have to version them using the Stackable version. An image gets released for every version of the SDP.
63+
Additionally, you can specify the Stackable version: As we need to make changes to the Images from time to time (e.g. security updates), we also have to version them using the Stackable version. An image gets released for every version of the SDP.
2164
There are two variants you can choose from:
2265

2366
1. Fixed version, e.g. `23.7.0`. This image will never change.
@@ -56,7 +99,7 @@ spec:
5699

57100
This will change the image from the default Stackable repository `docker.stackable.tech/stackable/kafka:3.3.1-stackable23.7.0` to `my.corp/myteam/stackable/kafka:3.3.1-stackable23.7.0`.
58101

59-
== Custom images
102+
== [[customimages]] Custom images
60103

61104
Custom images can be used to fetch arbitrary images from local or public registries.
62105
In comparison to the xref:_custom_docker_registry[], this allows to provide self-hosted or user-created images (e.g. user extended Stackable images).
@@ -74,3 +117,76 @@ The Stackable Operators configure their respective products based on the product
74117
This affects e.g. configuration properties or available features.
75118
Therefore, the operators are dependent on the product and its product version contained in the custom image.
76119
It's your responsibility to put in the correct product version.
120+
121+
Using custom images has a few limitations that users should be aware of.
122+
123+
* The images will *have* to have the same structures that Stackable operators expect.
124+
This should usually be ensured by specifying a Stackable image in the `FROM` clause of the Dockerfile.
125+
126+
* Images will have to be upgraded for every new Stackable release to follow structural changes that Stackable may have made to their images.
127+
When deriving images from official Stackable images this will mean updating the version of the image in the `FROM` clause to the correct Stackable release.
128+
129+
* It is not possible to update the Stackable Platform to a new version without changing the deployed cluster definitions when using custom images.
130+
The recommended process here is:
131+
132+
** Tag clusters as "do not reconcile" (see xref:cluster_operations.adoc[])
133+
** Update Stackable plattform
134+
** Change custom images in cluster specifications
135+
** Remove "do not reconcile flag"
136+
137+
## [[common_scenarios]] Common Scenarios
138+
139+
### Planned platform updates
140+
This is probably the most common scenario, users do not specify a Stackable version, and thus the operators always pick the image from their exact release.
141+
Updates happen by updating Stackable Operators, which will in turn restart the products with the new images.
142+
143+
#### Config
144+
145+
[source,yaml]
146+
----
147+
spec:
148+
image:
149+
productVersion: 3.3.1
150+
----
151+
152+
### Quick updates of images
153+
Sometimes it can be useful to decouple operators upgrades from the image versions to allow using updated images as soons as Stackable releases them.
154+
This can significantly shorten turnaround times when reacting to security vulnerabilities for example.
155+
156+
For this scenario the Stackable version can be set to the release line, without including the patch level indicator.
157+
This will cause the operator to always use the most current image that it is compatible with when starting products.
158+
159+
[NOTE]
160+
====
161+
This behavior can result in _mixed_ clusters running on different image versions of the product.
162+
This should not create any issues, since the contained product binaries are exactly the same, but is worth knowing.
163+
164+
A rolling restart of the product would clean this mixed state up.
165+
====
166+
167+
#### Config
168+
[source,yaml]
169+
----
170+
spec:
171+
image:
172+
productVersion: 3.3.1
173+
stackableVersion: 23.4
174+
----
175+
176+
177+
178+
#### Custom images / pinned images
179+
When a setup requires the utmost stability and it is preferrable for things to break, rather than run with a different image version that for example has not been certified.
180+
Or when a user requires custom libraries / code in the images they run and build their own images derived from official Stackable images, this is the only possible way to do this.
181+
182+
Please see the warnings in <<customimages, custom images section>> above for how to upgrade in this scenario.
183+
184+
#### Config
185+
[source,yaml]
186+
----
187+
spec:
188+
image:
189+
custom: my.corp/myteam/stackable/kafka:latest-and-greatest
190+
productVersion: 3.3.1
191+
----
192+

0 commit comments

Comments
 (0)