krane 1.0.0 → 1.1.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (48) hide show
  1. checksums.yaml +4 -4
  2. data/.github/CODEOWNERS +1 -0
  3. data/{ISSUE_TEMPLATE.md → .github/ISSUE_TEMPLATE.md} +0 -0
  4. data/{pull_request_template.md → .github/pull_request_template.md} +0 -0
  5. data/.gitignore +0 -3
  6. data/.rubocop-http---shopify-github-io-ruby-style-guide-rubocop-yml +1020 -0
  7. data/.rubocop.yml +0 -12
  8. data/.shopify-build/{kubernetes-deploy.yml → krane.yml} +16 -1
  9. data/1.0-Upgrade.md +4 -5
  10. data/CHANGELOG.md +55 -1
  11. data/CONTRIBUTING.md +5 -5
  12. data/Gemfile +0 -11
  13. data/README.md +22 -24
  14. data/bin/ci +1 -1
  15. data/bin/test +2 -2
  16. data/dev.yml +4 -4
  17. data/krane.gemspec +22 -5
  18. data/lib/krane/cli/deploy_command.rb +3 -4
  19. data/lib/krane/cli/global_deploy_command.rb +3 -3
  20. data/lib/krane/cli/render_command.rb +3 -3
  21. data/lib/krane/cluster_resource_discovery.rb +9 -6
  22. data/lib/krane/concurrency.rb +2 -2
  23. data/lib/krane/container_logs.rb +1 -1
  24. data/lib/krane/container_overrides.rb +33 -0
  25. data/lib/krane/deploy_task.rb +5 -5
  26. data/lib/krane/ejson_secret_provisioner.rb +7 -4
  27. data/lib/krane/global_deploy_task.rb +3 -2
  28. data/lib/krane/kubectl.rb +11 -1
  29. data/lib/krane/kubernetes_resource.rb +7 -6
  30. data/lib/krane/kubernetes_resource/custom_resource.rb +1 -1
  31. data/lib/krane/kubernetes_resource/custom_resource_definition.rb +1 -1
  32. data/lib/krane/kubernetes_resource/daemon_set.rb +1 -0
  33. data/lib/krane/kubernetes_resource/deployment.rb +3 -2
  34. data/lib/krane/kubernetes_resource/pod.rb +12 -8
  35. data/lib/krane/kubernetes_resource/replica_set.rb +2 -16
  36. data/lib/krane/kubernetes_resource/service.rb +3 -7
  37. data/lib/krane/kubernetes_resource/stateful_set.rb +1 -0
  38. data/lib/krane/render_task.rb +2 -2
  39. data/lib/krane/resource_cache.rb +6 -0
  40. data/lib/krane/resource_watcher.rb +2 -1
  41. data/lib/krane/restart_task.rb +2 -2
  42. data/lib/krane/runner_task.rb +16 -17
  43. data/lib/krane/statsd.rb +2 -2
  44. data/lib/krane/template_sets.rb +1 -1
  45. data/lib/krane/version.rb +1 -1
  46. metadata +168 -20
  47. data/lib/krane/kubernetes_resource/cloudsql.rb +0 -43
  48. data/shipit.yml +0 -4
@@ -1,43 +0,0 @@
1
- # frozen_string_literal: true
2
- module Krane
3
- class Cloudsql < KubernetesResource
4
- TIMEOUT = 10.minutes
5
-
6
- def sync(cache)
7
- super
8
- @proxy_deployment = cache.get_instance(Deployment.kind, "cloudsql-#{cloudsql_resource_uuid}")
9
- @proxy_service = cache.get_instance(Service.kind, "cloudsql-#{@name}")
10
- end
11
-
12
- def status
13
- deploy_succeeded? ? "Provisioned" : "Unknown"
14
- end
15
-
16
- def deploy_succeeded?
17
- proxy_deployment_ready? && proxy_service_ready?
18
- end
19
-
20
- def deploy_failed?
21
- false
22
- end
23
-
24
- private
25
-
26
- def proxy_deployment_ready?
27
- return false unless (status = @proxy_deployment["status"])
28
- # all cloudsql-proxy pods are running
29
- status.fetch("availableReplicas", -1) == status.fetch("replicas", 0)
30
- end
31
-
32
- def proxy_service_ready?
33
- return false unless @proxy_service.present?
34
- # the service has an assigned cluster IP and is therefore functioning
35
- @proxy_service.dig("spec", "clusterIP").present?
36
- end
37
-
38
- def cloudsql_resource_uuid
39
- return unless @instance_data
40
- @instance_data.dig("metadata", "uid")
41
- end
42
- end
43
- end
data/shipit.yml DELETED
@@ -1,4 +0,0 @@
1
- ci:
2
- hide:
3
- - buildkite/kubernetes-deploy-gem-nightly
4
-