class Object

Constants

BUILT_ARTIFACTS_FILE
DEFAULT_HOOK_SCRIPT
DEFAULT_HOOK_SCRIPT_LABEL
DEPLOY_YAML
EXT_TAR_GZ
PREDEPLOY_RESOURCES

NOTE(jmodes): the order matters, and predeploy resources will be deployed in order. e.g. Namespaces will be deployed before Services and ConfigMaps, which are namespaced resources that may depend on deploying Namespaces first.

Public Instance Methods

blank?() click to toggle source
# File lib/kube_deploy_tools/object.rb, line 7
def blank?
  !present?
end
fix_kubectl_apply_view_last_applied_output(json) click to toggle source

In kubectl version <= 1.7, `kubectl apply view-last-applied` may produces an invalid JSON output, which we must sanitize.

The upstream fix is in kubect >= 1.8: github.com/kubernetes/kubernetes/commit/7c656ab4d2ca41e07db9f90c99ee360b0d48c651

# File lib/kube_deploy_tools/kubernetes_resource/deployment.rb, line 54
def fix_kubectl_apply_view_last_applied_output(json)
  json.sub(/\!\"\(MISSING\)/, '"')
end
present?() click to toggle source
# File lib/kube_deploy_tools/object.rb, line 3
def present?
  self && to_s.strip != ''
end