Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for custom arguments for the cloud-controller-manager #7

Merged
merged 1 commit into from
Jul 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
16 changes: 16 additions & 0 deletions docs/modules/ROOT/pages/references/parameters.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,22 @@ default:: `syn-cloudscale-cloud-controller-manager`

The namespace in which to deploy this component.

== `manifests_version`

[horizontal]
type:: string
defaults:: [See `class/defaults.yml`]

The cloudscale CCM version to deploy.

== `args`

[horizontal]
type:: list
defaults:: `[]`

Additional arguments to provide to the cloudscale CCM.
The contents of this parameter are appended to the upstream manifest verbatim.

== `api_token`

Expand Down
Loading