Skip to content

Commit 39e93c4

Browse files
authored
Merge pull request #7 from projectsyn/feat/custom-args
Add support for custom arguments for the cloud-controller-manager
2 parents dd79437 + fd3f0dd commit 39e93c4

3 files changed

Lines changed: 30 additions & 3 deletions

File tree

class/defaults.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,6 @@ parameters:
55

66
manifests_version: 1.0.0
77

8+
args: []
9+
810
api_token: ?{vaultkv:${cluster:tenant}/${cluster:name}/cloudscale/token}

component/main.jsonnet

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,24 @@ local manifests = std.parseJson(
1313
);
1414

1515
local patchDaemonset(obj) =
16-
if isOpenShift && obj.kind == 'DaemonSet' then
16+
if obj.kind == 'DaemonSet' then
1717
obj {
1818
spec+: {
1919
template+: {
2020
spec+: {
21-
nodeSelector: {
21+
containers: [
22+
if c.name == 'cloudscale-cloud-controller-manager' then
23+
c {
24+
command+: params.args,
25+
}
26+
else
27+
c
28+
for c in super.containers
29+
],
30+
[if isOpenShift then 'nodeSelector']: {
2231
'node-role.kubernetes.io/master': '',
2332
},
24-
tolerations+: [
33+
[if isOpenShift then 'tolerations']+: [
2534
{
2635
key: 'node-role.kubernetes.io/master',
2736
effect: 'NoSchedule',

docs/modules/ROOT/pages/references/parameters.adoc

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,22 @@ default:: `syn-cloudscale-cloud-controller-manager`
1010

1111
The namespace in which to deploy this component.
1212

13+
== `manifests_version`
14+
15+
[horizontal]
16+
type:: string
17+
defaults:: [See `class/defaults.yml`]
18+
19+
The cloudscale CCM version to deploy.
20+
21+
== `args`
22+
23+
[horizontal]
24+
type:: list
25+
defaults:: `[]`
26+
27+
Additional arguments to provide to the cloudscale CCM.
28+
The contents of this parameter are appended to the upstream manifest verbatim.
1329

1430
== `api_token`
1531

0 commit comments

Comments
 (0)