You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: modules/concepts/pages/overrides.adoc
+53Lines changed: 53 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -151,6 +151,59 @@ They will *not* be applied to:
151
151
152
152
* Jobs, that are used to setup systems the product depends on e.g. create a database schema for Superset or Airflow.
153
153
154
+
[#object-overrides]
155
+
== Object overrides
156
+
157
+
Sometimes you need to override Kubernetes objects that are not covered by e.g. `podOverrides` or `configOverrides` like ServiceAccounts or the StatefulSet/Deployment/DaemonSet.
158
+
Object overrides let you modify any Kubernetes object that the operator creates as part of its reconciliation loop, which essentially includes all objects associated with a given stacklet.
159
+
160
+
On every Stackable CRD that is reconciled into a set of Kubernetes objects we provide the field `.spec.objectOverrides`.
161
+
This field accepts a list of arbitrary YAML objects, each of which must be a valid Kubernetes object.
162
+
163
+
For every object it creates, the operator processes the list of overrides from top to bottom.
164
+
It first checks if an override matches the object being created by comparing the `apiVersion`, `kind`, `name` and if applicable `namespace` (cluster-scoped objects may omit the namespace).
165
+
If an override matches, it is merged using the same mechanism as Pod overrides, using the merge algorithm described in the {k8s-openapi-deepmerge}[k8s-openapi docs{external-link-icon}^], which closely mimics the way Kubernetes applies patches to object.
166
+
167
+
As a result, you can only modify object created by the operator.
168
+
This mechanism does not work to deploy any additional arbitrary Kubernetes object.
0 commit comments