Skip to content

Commit

Permalink
Add support for custom arguments for the cloud-controller-manager
Browse files Browse the repository at this point in the history
  • Loading branch information
simu committed Jul 17, 2024
1 parent ecfcab6 commit 3a0a360
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
2 changes: 2 additions & 0 deletions class/defaults.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,6 @@ parameters:

manifests_version: 1.0.0

args: []

api_token: ?{vaultkv:${cluster:tenant}/${cluster:name}/cloudscale/token}
15 changes: 12 additions & 3 deletions component/main.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,24 @@ local manifests = std.parseJson(
);

local patchDaemonset(obj) =
if isOpenShift && obj.kind == 'DaemonSet' then
if obj.kind == 'DaemonSet' then
obj {
spec+: {
template+: {
spec+: {
nodeSelector: {
containers: [
if c.name == 'cloudscale-cloud-controller-manager' then
c {
command+: params.args,
}
else
c
for c in super.containers
],
[if isOpenShift then 'nodeSelector']: {
'node-role.kubernetes.io/master': '',
},
tolerations+: [
[if isOpenShift then 'tolerations']+: [
{
key: 'node-role.kubernetes.io/master',
effect: 'NoSchedule',
Expand Down

0 comments on commit 3a0a360

Please sign in to comment.