Skip to content

Commit

Permalink
edit
Browse files Browse the repository at this point in the history
  • Loading branch information
timothysmith0609 committed Jan 15, 2025
1 parent f23cd62 commit 18e0e5d
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 5 deletions.
2 changes: 0 additions & 2 deletions lib/krane/kubernetes_resource/custom_resource.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ class CustomResource < KubernetesResource
(.metadata.generation != .status.observedGeneration).
MSG

attr_reader :crd

def initialize(namespace:, context:, definition:, logger:, statsd_tags: [], crd:)
super(namespace: namespace, context: context, definition: definition,
logger: logger, statsd_tags: statsd_tags)
Expand Down
2 changes: 1 addition & 1 deletion lib/krane/kubernetes_resource/pod.rb
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ def doom_reason
# to too many pods referencing the same secret/configmap: https://github.com/kubernetes/kubernetes/pull/74755
# Error message format source: https://github.com/kubernetes/kubernetes/pull/75260
elsif limbo_reason == "CreateContainerConfigError" && !limbo_message.match("failed to sync (.*?) cache")
container configuration: #{limbo_message}"
"Failed to generate container configuration: #{limbo_message}"
elsif @status.dig("lastState", "terminated", "reason") == "ContainerCannotRun"
# ref: https://github.com/kubernetes/kubernetes/blob/562e721ece8a16e05c7e7d6bdd6334c910733ab2/pkg/kubelet/dockershim/docker_container.go#L353
exit_code = @status.dig('lastState', 'terminated', 'exitCode')
Expand Down
2 changes: 0 additions & 2 deletions lib/krane/resource_deployer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,6 @@ def deploy_resources(resources, prune: false, verify:, record_summary: true)
# Prunable resources should also applied so that they can be pruned
pruneable_types = @prune_allowlist.map { |t| t.split("/").last }

# Admission hooks can mutate resources, so we need to track those changes, otherwise the subsquent pruning
# may fail if we present a document that no longer matches the resource in the cluster.
individuals.each do |individual_resource|
individual_resource.deploy_started_at = Time.now.utc
case individual_resource.deploy_method
Expand Down

0 comments on commit 18e0e5d

Please sign in to comment.