Top Level Namespace

Defined Under Namespace

Modules: KubeDeployTools, KubernetesDeploy Classes: Hash, Object

Constant Summary collapse

BUILT_ARTIFACTS_FILE =
'build/kubernetes/images.yaml'.freeze
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.

%w[
  Namespace
  StorageClass
  ServiceAccount
  ClusterRole
  Role
  ClusterRoleBinding
  RoleBinding
  CustomResourceDefinition
  ThirdPartyResource
  ConfigMap
  Service
].freeze
DEFAULT_HOOK_SCRIPT =
'render_deploys_hook'
DEFAULT_HOOK_SCRIPT_LABEL =
'default'
VALID_DRY_RUN_VALUES =

As of kubernetes 1.23 valid dry-run options are: none, client, server.

%w[none client server].freeze
DEPLOY_YAML =
'deploy.yaml'
EXT_TAR_GZ =
".tar.gz"

Instance Method Summary collapse

Instance Method Details

#fix_kubectl_apply_view_last_applied_output(json) ⇒ Object

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



54
55
56
# File 'lib/kube_deploy_tools/kubernetes_resource/deployment.rb', line 54

def fix_kubectl_apply_view_last_applied_output(json)
  json.sub(/\!\"\(MISSING\)/, '"')
end