Skip to content
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
7 changes: 6 additions & 1 deletion class/defaults.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@ parameters:
multi_tenant: true
namespace: syn-cloudscale-cloud-controller-manager

manifests_version: 1.1.0
manifests_version: ${cloudscale_cloud_controller_manager:images:cloudscale_cloud_controller_manager:tag}
images:
cloudscale_cloud_controller_manager:
registry: quay.io
repository: cloudscalech/cloudscale-cloud-controller-manager
tag: 1.1.0

args: []

Expand Down
16 changes: 15 additions & 1 deletion component/main.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,21 @@ local inv = kap.inventory();
local params = inv.parameters.cloudscale_cloud_controller_manager;
local isOpenShift = std.member([ 'openshift4', 'oke' ], inv.parameters.facts.distribution);

local manifests_version =
local ccm_tag = params.images.cloudscale_cloud_controller_manager.tag;
if params.manifests_version != ccm_tag then
std.trace(
'Parameter `manifests_version` is deprecated, we recommend using ' +
'`images.cloudscale_cloud_controller_manager.tag` to configure the CCM version.',
params.manifests_version
)
else
ccm_tag;

local manifests = std.parseJson(
kap.yaml_load_stream(
'%s/manifests/%s/config.yml'
% [ inv.parameters._base_directory, params.manifests_version ]
% [ inv.parameters._base_directory, manifests_version ]
)
);

Expand All @@ -21,6 +32,9 @@ local patchDaemonset(obj) =
containers: [
if c.name == 'cloudscale-cloud-controller-manager' then
c {
image:
'%(registry)s/%(repository)s:%(tag)s' %
params.images.cloudscale_cloud_controller_manager,
command+: params.args,
}
else
Expand Down
18 changes: 17 additions & 1 deletion docs/modules/ROOT/pages/references/parameters.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,26 @@ The namespace in which to deploy this component.

[horizontal]
type:: string
defaults:: [See `class/defaults.yml`]
defaults:: `${cloudscale_cloud_controller_manager:images:cloudscale_cloud_controller_manager:tag}`

[IMPORTANT]
====
This parameter is deprecated.
Users should use parameter `images.cloudscale_cloud_controller_manager.tag` to select the manifests version that the component uses.
====

The cloudscale CCM version to deploy.

== `images`

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

The container images to use.

NOTE: The component uses the value of `images.cloudscale_cloud_controller_manager.tag` when downloading the upstream manifests which form the base for the manifests generated by the component.

== `args`

[horizontal]
Expand Down
Loading