Skip to content

Commit 0190000

Browse files
fix minor errors
1 parent 983fac1 commit 0190000

1 file changed

Lines changed: 2 additions & 8 deletions

File tree

lib/krane/resource_deployer.rb

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ def deploy_resources(resources, prune: false, verify:, record_summary: true)
116116
# Fail Fast! This is a programmer mistake.
117117
raise ArgumentError, "Unexpected deploy method! (#{individual_resource.deploy_method.inspect})"
118118
end
119-
applyables += possibly_mutated_resources.select { |r| pruneable_types.include?(r.type) && !r.deploy_method_override }
119+
applyables += updated_individuals.select { |r| pruneable_types.include?(r.type) && !r.deploy_method_override }
120120

121121
next if status.success?
122122

@@ -258,13 +258,7 @@ def create_resource(resource)
258258
output: 'json', output_is_sensitive: resource.sensitive_template_content?,
259259
use_namespace: !resource.global?)
260260

261-
# For resources that rely on a generateName attribute, we get the `name` from the result of the call to `create`
262-
# We must explicitly set this name value so that the `apply` step for pruning can run successfully
263-
if status.success? && resource.uses_generate_name?
264-
resource.use_generated_name(MultiJson.load(updated_resource_definition))
265-
end
266-
267-
updated_resources = KubernetesResource.build(
261+
updated_resource = KubernetesResource.build(
268262
namespace: @task_config.namespace,
269263
context: @task_config.context,
270264
definition: updated_resource_definition,

0 commit comments

Comments
 (0)