Skip to content

Commit cdd6d0a

Browse files
authored
Merge pull request #35 from dataiku/bug/dss13-sc-173304-gke-ability-to-add-label-and-taint-on-node
Fix taint support in macro and labels check
2 parents 39cef70 + 1102baa commit cdd6d0a

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

python-lib/dku_google/clusters.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,10 +126,7 @@ def with_nodepool_taints(self, nodepool_taints=[]):
126126
self.nodepool_taints.extend(nodepool_taints)
127127
return self
128128

129-
def with_nodepool_gcp_labels(self, nodepool_gcp_labels={}, cluster_formatted_labels=[]):
130-
if any(not label.get("from", "") for label in nodepool_gcp_labels):
131-
raise ValueError("Some of the cluster key-value label pairs have no key and thus are invalid: %s" % nodepool_gcp_labels)
132-
129+
def with_nodepool_gcp_labels(self, nodepool_gcp_labels={}, cluster_formatted_labels={}):
133130
if cluster_formatted_labels:
134131
logging.info("Adding cluster labels {} to node pool {}".format(cluster_formatted_labels, self.name))
135132
self.nodepool_gcp_labels.update(cluster_formatted_labels)

python-runnables/add-node-pool/runnable.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def run(self, progress_callback):
5050
node_pool_builder.with_service_account(node_pool_config.get('serviceAccountType', None),
5151
node_pool_config.get('serviceAccount', None))
5252
node_pool_builder.with_nodepool_labels(node_pool_config.get('nodepoolLabels', {}))
53-
node_pool_builder.with_nodepool_taints(node_pool.get('nodepoolTaints', []))
53+
node_pool_builder.with_nodepool_taints(node_pool_config.get('nodepoolTaints', []))
5454
node_pool_builder.with_nodepool_gcp_labels(node_pool_config.get('nodepoolGCPLabels', {}), cluster_data.get("cluster", {}).get("resourceLabels", {}))
5555
node_pool_builder.with_nodepool_tags(node_pool_config.get('networkTags', []))
5656

0 commit comments

Comments
 (0)