Skip to content

Commit

Permalink
Merge pull request #427 from powerhome/unknown-not-synced
Browse files Browse the repository at this point in the history
When resources don't exist, their status is Not Found
  • Loading branch information
dturn committed Feb 27, 2019
2 parents d28b284 + 7df71b5 commit 38f2085
Show file tree
Hide file tree
Showing 11 changed files with 11 additions and 10 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

*Bug fixes*
- Attempting to deploy from a directory that only contains `secrets.ejson` will no longer fail deploy ([#416](https://github.com/Shopify/kubernetes-deploy/pull/416))
- Resources which don't exist will be reported as "Not Found" rather than "Unknown"

*Other*
- Update kubeclient gem to 4.2.2. Note this replaces the `KubeclientBuilder::GoogleFriendlyConfig` class with `KubeclientBuilder::KubeConfig` ([#418](https://github.com/Shopify/kubernetes-deploy/pull/418))
Expand Down
2 changes: 1 addition & 1 deletion lib/kubernetes-deploy/kubernetes_resource.rb
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ def observed_generation
end

def status
exists? ? "Exists" : "Unknown"
exists? ? "Exists" : "Not Found"
end

def type
Expand Down
2 changes: 1 addition & 1 deletion lib/kubernetes-deploy/kubernetes_resource/config_map.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ def deploy_succeeded?
end

def status
exists? ? "Available" : "Unknown"
exists? ? "Available" : "Not Found"
end

def deploy_failed?
Expand Down
2 changes: 1 addition & 1 deletion lib/kubernetes-deploy/kubernetes_resource/ingress.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ class Ingress < KubernetesResource
TIMEOUT = 30.seconds

def status
exists? ? "Created" : "Unknown"
exists? ? "Created" : "Not Found"
end

def deploy_succeeded?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ class PersistentVolumeClaim < KubernetesResource
TIMEOUT = 5.minutes

def status
exists? ? @instance_data["status"]["phase"] : "Unknown"
exists? ? @instance_data["status"]["phase"] : "Not Found"
end

def deploy_succeeded?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ class PodDisruptionBudget < KubernetesResource
TIMEOUT = 10.seconds

def status
exists? ? "Available" : "Unknown"
exists? ? "Available" : "Not Found"
end

def deploy_succeeded?
Expand Down
2 changes: 1 addition & 1 deletion lib/kubernetes-deploy/kubernetes_resource/pod_template.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
module KubernetesDeploy
class PodTemplate < KubernetesResource
def status
exists? ? "Available" : "Unknown"
exists? ? "Available" : "Not Found"
end

def deploy_succeeded?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ class ResourceQuota < KubernetesResource
TIMEOUT = 30.seconds

def status
exists? ? "In effect" : "Unknown"
exists? ? "In effect" : "Not Found"
end

def deploy_succeeded?
Expand Down
2 changes: 1 addition & 1 deletion lib/kubernetes-deploy/kubernetes_resource/role.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ class Role < KubernetesResource
TIMEOUT = 30.seconds

def status
exists? ? "Created" : "Unknown"
exists? ? "Created" : "Not Found"
end

def deploy_succeeded?
Expand Down
2 changes: 1 addition & 1 deletion lib/kubernetes-deploy/kubernetes_resource/role_binding.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ class RoleBinding < KubernetesResource
TIMEOUT = 30.seconds

def status
exists? ? "Created" : "Unknown"
exists? ? "Created" : "Not Found"
end

def deploy_succeeded?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ class ServiceAccount < KubernetesResource
TIMEOUT = 30.seconds

def status
exists? ? "Created" : "Unknown"
exists? ? "Created" : "Not Found"
end

def deploy_succeeded?
Expand Down

0 comments on commit 38f2085

Please sign in to comment.