Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When resources don't exist, their status is Not Found #427

Merged
merged 1 commit into from
Feb 27, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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