krane 1.0.0 → 1.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/CODEOWNERS +1 -0
- data/{ISSUE_TEMPLATE.md → .github/ISSUE_TEMPLATE.md} +0 -0
- data/{pull_request_template.md → .github/pull_request_template.md} +0 -0
- data/.gitignore +0 -3
- data/.rubocop-http---shopify-github-io-ruby-style-guide-rubocop-yml +1020 -0
- data/.rubocop.yml +0 -12
- data/.shopify-build/{kubernetes-deploy.yml → krane.yml} +16 -1
- data/1.0-Upgrade.md +4 -5
- data/CHANGELOG.md +55 -1
- data/CONTRIBUTING.md +5 -5
- data/Gemfile +0 -11
- data/README.md +22 -24
- data/bin/ci +1 -1
- data/bin/test +2 -2
- data/dev.yml +4 -4
- data/krane.gemspec +22 -5
- data/lib/krane/cli/deploy_command.rb +3 -4
- data/lib/krane/cli/global_deploy_command.rb +3 -3
- data/lib/krane/cli/render_command.rb +3 -3
- data/lib/krane/cluster_resource_discovery.rb +9 -6
- data/lib/krane/concurrency.rb +2 -2
- data/lib/krane/container_logs.rb +1 -1
- data/lib/krane/container_overrides.rb +33 -0
- data/lib/krane/deploy_task.rb +5 -5
- data/lib/krane/ejson_secret_provisioner.rb +7 -4
- data/lib/krane/global_deploy_task.rb +3 -2
- data/lib/krane/kubectl.rb +11 -1
- data/lib/krane/kubernetes_resource.rb +7 -6
- data/lib/krane/kubernetes_resource/custom_resource.rb +1 -1
- data/lib/krane/kubernetes_resource/custom_resource_definition.rb +1 -1
- data/lib/krane/kubernetes_resource/daemon_set.rb +1 -0
- data/lib/krane/kubernetes_resource/deployment.rb +3 -2
- data/lib/krane/kubernetes_resource/pod.rb +12 -8
- data/lib/krane/kubernetes_resource/replica_set.rb +2 -16
- data/lib/krane/kubernetes_resource/service.rb +3 -7
- data/lib/krane/kubernetes_resource/stateful_set.rb +1 -0
- data/lib/krane/render_task.rb +2 -2
- data/lib/krane/resource_cache.rb +6 -0
- data/lib/krane/resource_watcher.rb +2 -1
- data/lib/krane/restart_task.rb +2 -2
- data/lib/krane/runner_task.rb +16 -17
- data/lib/krane/statsd.rb +2 -2
- data/lib/krane/template_sets.rb +1 -1
- data/lib/krane/version.rb +1 -1
- metadata +168 -20
- data/lib/krane/kubernetes_resource/cloudsql.rb +0 -43
- 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