Skip to content

Commit

Permalink
Apply new helpers from Commodore library
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian Haeusler committed Jun 30, 2020
1 parent 0d6c246 commit 9c3c190
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions component/main.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ local machineSet = function(name, set)
namespace: params.namespace,
},
spec+: {
replicas: if std.objectHas(set, 'replicas') then set.replicas else 1,
replicas: com.getValueOrDefault(set, 'replicas', 1),
selector+: {
matchLabels+: {
'machine.openshift.io/cluster-api-cluster': params.infrastructureID,
Expand Down Expand Up @@ -53,7 +53,7 @@ local machineSet = function(name, set)
},
},
}
+ if std.objectHas(set, 'spec') then { spec+: set.spec } else {};
+ if std.objectHas(set, 'spec') then { spec+: com.makeMergeable(set.spec) } else {};

local isMultiAz = function(name)
std.objectHas(params.nodeGroups[name], 'multiAz') && params.nodeGroups[name].multiAz == true;
Expand Down

0 comments on commit 9c3c190

Please sign in to comment.