Skip to content

Commit 7ac8e5e

Browse files
jwitkoJason Witkowskiprometherion
authored
fix: kube-apiserver extra args override
Co-authored-by: Jason Witkowski <[email protected]> Co-authored-by: Dario Tranchitella <[email protected]>
1 parent cec4f91 commit 7ac8e5e

File tree

5 files changed

+11
-6
lines changed

5 files changed

+11
-6
lines changed

api/v1alpha1/tenantcontrolplane_types.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,9 @@ type DeploymentSpec struct {
138138
// (kube-apiserver, controller-manager, and scheduler).
139139
Resources *ControlPlaneComponentsResources `json:"resources,omitempty"`
140140
// ExtraArgs allows adding additional arguments to the Control Plane components,
141-
// such as kube-apiserver, controller-manager, and scheduler.
141+
// such as kube-apiserver, controller-manager, and scheduler. WARNING - This option
142+
// can override existing parameters and cause components to misbehave in unxpected ways.
143+
// Only modify if you know what you are doing.
142144
ExtraArgs *ControlPlaneExtraArgs `json:"extraArgs,omitempty"`
143145
AdditionalMetadata AdditionalMetadata `json:"additionalMetadata,omitempty"`
144146
// AdditionalInitContainers allows adding additional init containers to the Control Plane deployment.

config/crd/bases/kamaji.clastix.io_tenantcontrolplanes.yaml

+4-1
Original file line numberDiff line numberDiff line change
@@ -6058,7 +6058,10 @@ spec:
60586058
extraArgs:
60596059
description: ExtraArgs allows adding additional arguments
60606060
to the Control Plane components, such as kube-apiserver,
6061-
controller-manager, and scheduler.
6061+
controller-manager, and scheduler. WARNING - This option
6062+
can override existing parameters and cause components to
6063+
misbehave in unxpected ways. Only modify if you know what
6064+
you are doing.
60626065
properties:
60636066
apiServer:
60646067
items:

config/install.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3722,7 +3722,7 @@ spec:
37223722
type: object
37233723
type: object
37243724
extraArgs:
3725-
description: ExtraArgs allows adding additional arguments to the Control Plane components, such as kube-apiserver, controller-manager, and scheduler.
3725+
description: ExtraArgs allows adding additional arguments to the Control Plane components, such as kube-apiserver, controller-manager, and scheduler. WARNING - This option can override existing parameters and cause components to misbehave in unxpected ways. Only modify if you know what you are doing.
37263726
properties:
37273727
apiServer:
37283728
items:

docs/content/reference/api.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1000,7 +1000,7 @@ Defining the options for the deployed Tenant Control Plane as Deployment resourc
10001000
<td><b><a href="#tenantcontrolplanespeccontrolplanedeploymentextraargs">extraArgs</a></b></td>
10011001
<td>object</td>
10021002
<td>
1003-
ExtraArgs allows adding additional arguments to the Control Plane components, such as kube-apiserver, controller-manager, and scheduler.<br/>
1003+
ExtraArgs allows adding additional arguments to the Control Plane components, such as kube-apiserver, controller-manager, and scheduler. WARNING - This option can override existing parameters and cause components to misbehave in unxpected ways. Only modify if you know what you are doing.<br/>
10041004
</td>
10051005
<td>false</td>
10061006
</tr><tr>
@@ -10320,7 +10320,7 @@ A label selector requirement is a selector that contains values, a key, and an o
1032010320

1032110321

1032210322

10323-
ExtraArgs allows adding additional arguments to the Control Plane components, such as kube-apiserver, controller-manager, and scheduler.
10323+
ExtraArgs allows adding additional arguments to the Control Plane components, such as kube-apiserver, controller-manager, and scheduler. WARNING - This option can override existing parameters and cause components to misbehave in unxpected ways. Only modify if you know what you are doing.
1032410324

1032510325
<table>
1032610326
<thead>

internal/builders/controlplane/deployment.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -727,7 +727,7 @@ func (d Deployment) buildKubeAPIServerCommand(tenantControlPlane kamajiv1alpha1.
727727

728728
// Order matters, here: extraArgs could try to overwrite some arguments managed by Kamaji and that would be crucial.
729729
// Adding as first element of the array of maps, we're sure that these overrides will be sanitized by our configuration.
730-
return utilities.MergeMaps(extraArgs, current, desiredArgs)
730+
return utilities.MergeMaps(current, desiredArgs, extraArgs)
731731
}
732732

733733
func (d Deployment) secretProjection(secretName, certKeyName, keyName string) *corev1.SecretProjection {

0 commit comments

Comments
 (0)