2016-11-22 14:55:56 -05:00
|
|
|
module KubernetesHelpers
|
|
|
|
include Gitlab::Kubernetes
|
|
|
|
|
2017-06-13 11:31:23 -04:00
|
|
|
def kube_response(body)
|
|
|
|
{ body: body.to_json }
|
|
|
|
end
|
|
|
|
|
|
|
|
def kube_pods_response
|
|
|
|
kube_response(kube_pods_body)
|
|
|
|
end
|
|
|
|
|
2019-02-26 12:14:00 -05:00
|
|
|
def kube_logs_response
|
|
|
|
kube_response(kube_logs_body)
|
|
|
|
end
|
|
|
|
|
2018-05-10 04:52:58 -04:00
|
|
|
def kube_deployments_response
|
|
|
|
kube_response(kube_deployments_body)
|
|
|
|
end
|
|
|
|
|
2017-10-30 08:55:18 -04:00
|
|
|
def stub_kubeclient_discover(api_url)
|
|
|
|
WebMock.stub_request(:get, api_url + '/api/v1').to_return(kube_response(kube_v1_discovery_body))
|
2018-05-10 04:52:58 -04:00
|
|
|
WebMock.stub_request(:get, api_url + '/apis/extensions/v1beta1').to_return(kube_response(kube_v1beta1_discovery_body))
|
2018-09-06 06:03:38 -04:00
|
|
|
WebMock.stub_request(:get, api_url + '/apis/rbac.authorization.k8s.io/v1').to_return(kube_response(kube_v1_rbac_authorization_discovery_body))
|
2018-11-15 06:39:43 -05:00
|
|
|
WebMock.stub_request(:get, api_url + '/apis/serving.knative.dev/v1alpha1').to_return(kube_response(kube_v1alpha1_serving_knative_discovery_body))
|
2017-06-13 11:31:23 -04:00
|
|
|
end
|
|
|
|
|
2018-12-17 02:31:38 -05:00
|
|
|
def stub_kubeclient_service_pods(response = nil)
|
|
|
|
stub_kubeclient_discover(service.api_url)
|
|
|
|
pods_url = service.api_url + "/api/v1/pods"
|
|
|
|
|
|
|
|
WebMock.stub_request(:get, pods_url).to_return(response || kube_pods_response)
|
|
|
|
end
|
|
|
|
|
2017-06-13 11:31:23 -04:00
|
|
|
def stub_kubeclient_pods(response = nil)
|
2017-10-31 04:47:48 -04:00
|
|
|
stub_kubeclient_discover(service.api_url)
|
2017-06-13 11:31:23 -04:00
|
|
|
pods_url = service.api_url + "/api/v1/namespaces/#{service.actual_namespace}/pods"
|
|
|
|
|
|
|
|
WebMock.stub_request(:get, pods_url).to_return(response || kube_pods_response)
|
|
|
|
end
|
|
|
|
|
2019-02-26 12:14:00 -05:00
|
|
|
def stub_kubeclient_logs(pod_name, response = nil)
|
|
|
|
stub_kubeclient_discover(service.api_url)
|
|
|
|
logs_url = service.api_url + "/api/v1/namespaces/#{service.actual_namespace}/pods/#{pod_name}/log?tailLines=#{Clusters::Platforms::Kubernetes::LOGS_LIMIT}"
|
|
|
|
|
|
|
|
WebMock.stub_request(:get, logs_url).to_return(response || kube_logs_response)
|
|
|
|
end
|
|
|
|
|
2018-05-10 04:52:58 -04:00
|
|
|
def stub_kubeclient_deployments(response = nil)
|
|
|
|
stub_kubeclient_discover(service.api_url)
|
|
|
|
deployments_url = service.api_url + "/apis/extensions/v1beta1/namespaces/#{service.actual_namespace}/deployments"
|
|
|
|
|
|
|
|
WebMock.stub_request(:get, deployments_url).to_return(response || kube_deployments_response)
|
|
|
|
end
|
|
|
|
|
2018-12-06 13:08:49 -05:00
|
|
|
def stub_kubeclient_knative_services(**options)
|
|
|
|
options[:name] ||= "kubetest"
|
|
|
|
options[:namespace] ||= "default"
|
|
|
|
options[:domain] ||= "example.com"
|
|
|
|
|
|
|
|
stub_kubeclient_discover(service.api_url)
|
|
|
|
knative_url = service.api_url + "/apis/serving.knative.dev/v1alpha1/services"
|
|
|
|
|
|
|
|
WebMock.stub_request(:get, knative_url).to_return(kube_response(kube_knative_services_body(options)))
|
|
|
|
end
|
|
|
|
|
2018-10-22 18:04:58 -04:00
|
|
|
def stub_kubeclient_get_secret(api_url, **options)
|
2018-09-07 07:48:06 -04:00
|
|
|
options[:metadata_name] ||= "default-token-1"
|
2018-10-22 18:04:58 -04:00
|
|
|
options[:namespace] ||= "default"
|
2018-09-07 07:48:06 -04:00
|
|
|
|
2018-10-22 18:04:58 -04:00
|
|
|
WebMock.stub_request(:get, api_url + "/api/v1/namespaces/#{options[:namespace]}/secrets/#{options[:metadata_name]}")
|
2018-09-07 07:48:06 -04:00
|
|
|
.to_return(kube_response(kube_v1_secret_body(options)))
|
2017-10-30 08:55:18 -04:00
|
|
|
end
|
|
|
|
|
2018-11-13 07:46:01 -05:00
|
|
|
def stub_kubeclient_get_secret_error(api_url, name, namespace: 'default', status: 404)
|
2018-09-12 00:00:51 -04:00
|
|
|
WebMock.stub_request(:get, api_url + "/api/v1/namespaces/#{namespace}/secrets/#{name}")
|
2018-11-13 07:46:01 -05:00
|
|
|
.to_return(status: [status, "Internal Server Error"])
|
2017-10-30 08:55:18 -04:00
|
|
|
end
|
|
|
|
|
2018-12-27 17:56:55 -05:00
|
|
|
def stub_kubeclient_get_service_account(api_url, name, namespace: 'default')
|
|
|
|
WebMock.stub_request(:get, api_url + "/api/v1/namespaces/#{namespace}/serviceaccounts/#{name}")
|
|
|
|
.to_return(kube_response({}))
|
|
|
|
end
|
|
|
|
|
2018-11-28 05:31:28 -05:00
|
|
|
def stub_kubeclient_get_service_account_error(api_url, name, namespace: 'default', status: 404)
|
|
|
|
WebMock.stub_request(:get, api_url + "/api/v1/namespaces/#{namespace}/serviceaccounts/#{name}")
|
|
|
|
.to_return(status: [status, "Internal Server Error"])
|
|
|
|
end
|
|
|
|
|
2018-08-29 05:07:01 -04:00
|
|
|
def stub_kubeclient_create_service_account(api_url, namespace: 'default')
|
|
|
|
WebMock.stub_request(:post, api_url + "/api/v1/namespaces/#{namespace}/serviceaccounts")
|
|
|
|
.to_return(kube_response({}))
|
|
|
|
end
|
|
|
|
|
2018-09-07 07:48:06 -04:00
|
|
|
def stub_kubeclient_create_service_account_error(api_url, namespace: 'default')
|
|
|
|
WebMock.stub_request(:post, api_url + "/api/v1/namespaces/#{namespace}/serviceaccounts")
|
|
|
|
.to_return(status: [500, "Internal Server Error"])
|
|
|
|
end
|
|
|
|
|
2018-12-27 17:56:55 -05:00
|
|
|
def stub_kubeclient_put_service_account(api_url, name, namespace: 'default')
|
|
|
|
WebMock.stub_request(:put, api_url + "/api/v1/namespaces/#{namespace}/serviceaccounts/#{name}")
|
|
|
|
.to_return(kube_response({}))
|
|
|
|
end
|
|
|
|
|
2018-09-07 07:48:06 -04:00
|
|
|
def stub_kubeclient_create_secret(api_url, namespace: 'default')
|
|
|
|
WebMock.stub_request(:post, api_url + "/api/v1/namespaces/#{namespace}/secrets")
|
|
|
|
.to_return(kube_response({}))
|
|
|
|
end
|
|
|
|
|
2018-11-28 05:31:28 -05:00
|
|
|
def stub_kubeclient_put_secret(api_url, name, namespace: 'default')
|
|
|
|
WebMock.stub_request(:put, api_url + "/api/v1/namespaces/#{namespace}/secrets/#{name}")
|
|
|
|
.to_return(kube_response({}))
|
|
|
|
end
|
|
|
|
|
|
|
|
def stub_kubeclient_get_cluster_role_binding_error(api_url, name, status: 404)
|
|
|
|
WebMock.stub_request(:get, api_url + "/apis/rbac.authorization.k8s.io/v1/clusterrolebindings/#{name}")
|
|
|
|
.to_return(status: [status, "Internal Server Error"])
|
|
|
|
end
|
|
|
|
|
2018-08-29 05:07:01 -04:00
|
|
|
def stub_kubeclient_create_cluster_role_binding(api_url)
|
|
|
|
WebMock.stub_request(:post, api_url + '/apis/rbac.authorization.k8s.io/v1/clusterrolebindings')
|
|
|
|
.to_return(kube_response({}))
|
|
|
|
end
|
|
|
|
|
2018-12-27 17:56:55 -05:00
|
|
|
def stub_kubeclient_get_role_binding(api_url, name, namespace: 'default')
|
|
|
|
WebMock.stub_request(:get, api_url + "/apis/rbac.authorization.k8s.io/v1/namespaces/#{namespace}/rolebindings/#{name}")
|
|
|
|
.to_return(kube_response({}))
|
|
|
|
end
|
|
|
|
|
2018-11-28 05:31:28 -05:00
|
|
|
def stub_kubeclient_get_role_binding_error(api_url, name, namespace: 'default', status: 404)
|
|
|
|
WebMock.stub_request(:get, api_url + "/apis/rbac.authorization.k8s.io/v1/namespaces/#{namespace}/rolebindings/#{name}")
|
|
|
|
.to_return(status: [status, "Internal Server Error"])
|
|
|
|
end
|
|
|
|
|
2018-10-22 18:04:58 -04:00
|
|
|
def stub_kubeclient_create_role_binding(api_url, namespace: 'default')
|
|
|
|
WebMock.stub_request(:post, api_url + "/apis/rbac.authorization.k8s.io/v1/namespaces/#{namespace}/rolebindings")
|
|
|
|
.to_return(kube_response({}))
|
|
|
|
end
|
|
|
|
|
2018-12-27 17:56:55 -05:00
|
|
|
def stub_kubeclient_put_role_binding(api_url, name, namespace: 'default')
|
|
|
|
WebMock.stub_request(:put, api_url + "/apis/rbac.authorization.k8s.io/v1/namespaces/#{namespace}/rolebindings/#{name}")
|
|
|
|
.to_return(kube_response({}))
|
|
|
|
end
|
|
|
|
|
2018-10-22 18:04:58 -04:00
|
|
|
def stub_kubeclient_create_namespace(api_url)
|
|
|
|
WebMock.stub_request(:post, api_url + "/api/v1/namespaces")
|
|
|
|
.to_return(kube_response({}))
|
|
|
|
end
|
|
|
|
|
|
|
|
def stub_kubeclient_get_namespace(api_url, namespace: 'default')
|
|
|
|
WebMock.stub_request(:get, api_url + "/api/v1/namespaces/#{namespace}")
|
|
|
|
.to_return(kube_response({}))
|
|
|
|
end
|
|
|
|
|
2018-09-07 07:48:06 -04:00
|
|
|
def kube_v1_secret_body(**options)
|
2017-10-30 08:55:18 -04:00
|
|
|
{
|
|
|
|
"kind" => "SecretList",
|
|
|
|
"apiVersion": "v1",
|
2018-09-07 07:48:06 -04:00
|
|
|
"metadata": {
|
|
|
|
"name": options[:metadata_name] || "default-token-1",
|
|
|
|
"namespace": "kube-system"
|
|
|
|
},
|
|
|
|
"data": {
|
|
|
|
"token": options[:token] || Base64.encode64('token-sample-123')
|
|
|
|
}
|
2017-10-30 08:55:18 -04:00
|
|
|
}
|
|
|
|
end
|
|
|
|
|
2017-06-13 11:31:23 -04:00
|
|
|
def kube_v1_discovery_body
|
2017-02-22 12:44:44 -05:00
|
|
|
{
|
|
|
|
"kind" => "APIResourceList",
|
2016-11-22 14:55:56 -05:00
|
|
|
"resources" => [
|
2017-10-30 08:55:18 -04:00
|
|
|
{ "name" => "pods", "namespaced" => true, "kind" => "Pod" },
|
2018-05-10 04:52:58 -04:00
|
|
|
{ "name" => "deployments", "namespaced" => true, "kind" => "Deployment" },
|
2018-09-06 06:03:38 -04:00
|
|
|
{ "name" => "secrets", "namespaced" => true, "kind" => "Secret" },
|
2018-08-29 05:07:01 -04:00
|
|
|
{ "name" => "serviceaccounts", "namespaced" => true, "kind" => "ServiceAccount" },
|
2018-10-22 18:04:58 -04:00
|
|
|
{ "name" => "services", "namespaced" => true, "kind" => "Service" },
|
|
|
|
{ "name" => "namespaces", "namespaced" => true, "kind" => "Namespace" }
|
2018-05-10 04:52:58 -04:00
|
|
|
]
|
|
|
|
}
|
|
|
|
end
|
|
|
|
|
|
|
|
def kube_v1beta1_discovery_body
|
|
|
|
{
|
|
|
|
"kind" => "APIResourceList",
|
|
|
|
"resources" => [
|
|
|
|
{ "name" => "pods", "namespaced" => true, "kind" => "Pod" },
|
|
|
|
{ "name" => "deployments", "namespaced" => true, "kind" => "Deployment" },
|
2018-09-06 06:03:38 -04:00
|
|
|
{ "name" => "secrets", "namespaced" => true, "kind" => "Secret" },
|
2018-08-29 05:07:01 -04:00
|
|
|
{ "name" => "serviceaccounts", "namespaced" => true, "kind" => "ServiceAccount" },
|
2018-09-06 06:03:38 -04:00
|
|
|
{ "name" => "services", "namespaced" => true, "kind" => "Service" }
|
|
|
|
]
|
|
|
|
}
|
|
|
|
end
|
|
|
|
|
|
|
|
def kube_v1_rbac_authorization_discovery_body
|
|
|
|
{
|
|
|
|
"kind" => "APIResourceList",
|
|
|
|
"resources" => [
|
|
|
|
{ "name" => "clusterrolebindings", "namespaced" => false, "kind" => "ClusterRoleBinding" },
|
|
|
|
{ "name" => "clusterroles", "namespaced" => false, "kind" => "ClusterRole" },
|
|
|
|
{ "name" => "rolebindings", "namespaced" => true, "kind" => "RoleBinding" },
|
|
|
|
{ "name" => "roles", "namespaced" => true, "kind" => "Role" }
|
2017-02-22 12:44:44 -05:00
|
|
|
]
|
2016-11-22 14:55:56 -05:00
|
|
|
}
|
|
|
|
end
|
|
|
|
|
2018-11-15 06:39:43 -05:00
|
|
|
def kube_v1alpha1_serving_knative_discovery_body
|
|
|
|
{
|
|
|
|
"kind" => "APIResourceList",
|
|
|
|
"resources" => [
|
|
|
|
{ "name" => "revisions", "namespaced" => true, "kind" => "Revision" },
|
|
|
|
{ "name" => "services", "namespaced" => true, "kind" => "Service" },
|
|
|
|
{ "name" => "configurations", "namespaced" => true, "kind" => "Configuration" },
|
|
|
|
{ "name" => "routes", "namespaced" => true, "kind" => "Route" }
|
|
|
|
]
|
|
|
|
}
|
|
|
|
end
|
|
|
|
|
2017-06-13 11:31:23 -04:00
|
|
|
def kube_pods_body
|
|
|
|
{
|
|
|
|
"kind" => "PodList",
|
|
|
|
"items" => [kube_pod]
|
|
|
|
}
|
2016-11-22 14:55:56 -05:00
|
|
|
end
|
|
|
|
|
2019-02-26 12:14:00 -05:00
|
|
|
def kube_logs_body
|
|
|
|
"Log 1\nLog 2\nLog 3"
|
|
|
|
end
|
|
|
|
|
2018-05-10 04:52:58 -04:00
|
|
|
def kube_deployments_body
|
|
|
|
{
|
|
|
|
"kind" => "DeploymentList",
|
|
|
|
"items" => [kube_deployment]
|
|
|
|
}
|
|
|
|
end
|
|
|
|
|
2018-12-17 02:31:38 -05:00
|
|
|
def kube_knative_pods_body(name, namespace)
|
|
|
|
{
|
|
|
|
"kind" => "PodList",
|
|
|
|
"items" => [kube_knative_pod(name: name, namespace: namespace)]
|
|
|
|
}
|
|
|
|
end
|
|
|
|
|
2018-12-06 13:08:49 -05:00
|
|
|
def kube_knative_services_body(**options)
|
|
|
|
{
|
|
|
|
"kind" => "List",
|
|
|
|
"items" => [kube_service(options)]
|
|
|
|
}
|
|
|
|
end
|
|
|
|
|
2016-11-22 14:55:56 -05:00
|
|
|
# This is a partial response, it will have many more elements in reality but
|
|
|
|
# these are the ones we care about at the moment
|
2019-03-21 04:06:47 -04:00
|
|
|
def kube_pod(name: "kube-pod", environment_slug: "production", project_slug: "project-path-slug", status: "Running", track: nil)
|
2017-02-22 12:44:44 -05:00
|
|
|
{
|
|
|
|
"metadata" => {
|
2017-06-13 11:31:23 -04:00
|
|
|
"name" => name,
|
2018-05-10 04:52:58 -04:00
|
|
|
"generate_name" => "generated-name-with-suffix",
|
2016-11-22 14:55:56 -05:00
|
|
|
"creationTimestamp" => "2016-11-25T19:55:19Z",
|
2019-03-21 04:06:47 -04:00
|
|
|
"annotations" => {
|
|
|
|
"app.gitlab.com/env" => environment_slug,
|
|
|
|
"app.gitlab.com/app" => project_slug
|
|
|
|
},
|
2018-05-10 04:52:58 -04:00
|
|
|
"labels" => {
|
|
|
|
"track" => track
|
2019-03-21 04:06:47 -04:00
|
|
|
}.compact
|
2016-11-22 14:55:56 -05:00
|
|
|
},
|
|
|
|
"spec" => {
|
|
|
|
"containers" => [
|
|
|
|
{ "name" => "container-0" },
|
2017-05-03 07:22:03 -04:00
|
|
|
{ "name" => "container-1" }
|
|
|
|
]
|
2016-11-22 14:55:56 -05:00
|
|
|
},
|
2018-05-10 04:52:58 -04:00
|
|
|
"status" => { "phase" => status }
|
|
|
|
}
|
|
|
|
end
|
|
|
|
|
2018-12-17 02:31:38 -05:00
|
|
|
# Similar to a kube_pod, but should contain a running service
|
|
|
|
def kube_knative_pod(name: "kube-pod", namespace: "default", status: "Running")
|
|
|
|
{
|
|
|
|
"metadata" => {
|
|
|
|
"name" => name,
|
|
|
|
"namespace" => namespace,
|
|
|
|
"generate_name" => "generated-name-with-suffix",
|
|
|
|
"creationTimestamp" => "2016-11-25T19:55:19Z",
|
|
|
|
"labels" => {
|
|
|
|
"serving.knative.dev/service" => name
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"spec" => {
|
|
|
|
"containers" => [
|
|
|
|
{ "name" => "container-0" },
|
|
|
|
{ "name" => "container-1" }
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"status" => { "phase" => status }
|
|
|
|
}
|
|
|
|
end
|
|
|
|
|
2019-03-21 04:06:47 -04:00
|
|
|
def kube_deployment(name: "kube-deployment", environment_slug: "production", project_slug: "project-path-slug", track: nil)
|
2018-05-10 04:52:58 -04:00
|
|
|
{
|
|
|
|
"metadata" => {
|
|
|
|
"name" => name,
|
|
|
|
"generation" => 4,
|
2019-03-21 04:06:47 -04:00
|
|
|
"annotations" => {
|
|
|
|
"app.gitlab.com/env" => environment_slug,
|
|
|
|
"app.gitlab.com/app" => project_slug
|
|
|
|
},
|
2018-05-10 04:52:58 -04:00
|
|
|
"labels" => {
|
|
|
|
"track" => track
|
|
|
|
}.compact
|
|
|
|
},
|
|
|
|
"spec" => { "replicas" => 3 },
|
|
|
|
"status" => {
|
|
|
|
"observedGeneration" => 4,
|
|
|
|
"replicas" => 3,
|
|
|
|
"updatedReplicas" => 3,
|
|
|
|
"availableReplicas" => 3
|
|
|
|
}
|
2016-11-22 14:55:56 -05:00
|
|
|
}
|
|
|
|
end
|
|
|
|
|
2018-12-06 13:08:49 -05:00
|
|
|
def kube_service(name: "kubetest", namespace: "default", domain: "example.com")
|
|
|
|
{
|
|
|
|
"metadata" => {
|
2018-12-17 02:31:38 -05:00
|
|
|
"creationTimestamp" => "2018-11-21T06:16:33Z",
|
|
|
|
"name" => name,
|
|
|
|
"namespace" => namespace,
|
|
|
|
"selfLink" => "/apis/serving.knative.dev/v1alpha1/namespaces/#{namespace}/services/#{name}"
|
2018-12-06 13:08:49 -05:00
|
|
|
},
|
|
|
|
"spec" => {
|
|
|
|
"generation" => 2
|
|
|
|
},
|
|
|
|
"status" => {
|
|
|
|
"domain" => "#{name}.#{namespace}.#{domain}",
|
|
|
|
"domainInternal" => "#{name}.#{namespace}.svc.cluster.local",
|
|
|
|
"latestCreatedRevisionName" => "#{name}-00002",
|
|
|
|
"latestReadyRevisionName" => "#{name}-00002",
|
|
|
|
"observedGeneration" => 2
|
|
|
|
}
|
|
|
|
}
|
|
|
|
end
|
|
|
|
|
|
|
|
def kube_service_full(name: "kubetest", namespace: "kube-ns", domain: "example.com")
|
|
|
|
{
|
|
|
|
"metadata" => {
|
|
|
|
"creationTimestamp" => "2018-11-21T06:16:33Z",
|
|
|
|
"name" => name,
|
|
|
|
"namespace" => namespace,
|
|
|
|
"selfLink" => "/apis/serving.knative.dev/v1alpha1/namespaces/#{namespace}/services/#{name}",
|
|
|
|
"annotation" => {
|
|
|
|
"description" => "This is a test description"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"spec" => {
|
|
|
|
"generation" => 2,
|
|
|
|
"build" => {
|
|
|
|
"template" => "go-1.10.3"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"status" => {
|
|
|
|
"domain" => "#{name}.#{namespace}.#{domain}",
|
|
|
|
"domainInternal" => "#{name}.#{namespace}.svc.cluster.local",
|
|
|
|
"latestCreatedRevisionName" => "#{name}-00002",
|
|
|
|
"latestReadyRevisionName" => "#{name}-00002",
|
|
|
|
"observedGeneration" => 2
|
|
|
|
}
|
|
|
|
}
|
|
|
|
end
|
|
|
|
|
2016-11-22 14:55:56 -05:00
|
|
|
def kube_terminals(service, pod)
|
|
|
|
pod_name = pod['metadata']['name']
|
|
|
|
containers = pod['spec']['containers']
|
|
|
|
|
|
|
|
containers.map do |container|
|
|
|
|
terminal = {
|
|
|
|
selectors: { pod: pod_name, container: container['name'] },
|
2017-05-08 11:28:05 -04:00
|
|
|
url: container_exec_url(service.api_url, service.actual_namespace, pod_name, container['name']),
|
2016-11-22 14:55:56 -05:00
|
|
|
subprotocols: ['channel.k8s.io'],
|
|
|
|
headers: { 'Authorization' => ["Bearer #{service.token}"] },
|
2017-01-26 13:16:50 -05:00
|
|
|
created_at: DateTime.parse(pod['metadata']['creationTimestamp']),
|
|
|
|
max_session_time: 0
|
2016-11-22 14:55:56 -05:00
|
|
|
}
|
|
|
|
terminal[:ca_pem] = service.ca_pem if service.ca_pem.present?
|
|
|
|
terminal
|
|
|
|
end
|
|
|
|
end
|
2018-05-10 04:52:58 -04:00
|
|
|
|
|
|
|
def kube_deployment_rollout_status
|
|
|
|
::Gitlab::Kubernetes::RolloutStatus.from_deployments(kube_deployment)
|
|
|
|
end
|
|
|
|
|
|
|
|
def empty_deployment_rollout_status
|
2019-01-24 08:43:02 -05:00
|
|
|
::Gitlab::Kubernetes::RolloutStatus.from_deployments
|
2018-05-10 04:52:58 -04:00
|
|
|
end
|
2016-11-22 14:55:56 -05:00
|
|
|
end
|