Skip to content

Commit

Permalink
Remove the health checks from ContainerEmbeddedAnsible
Browse files Browse the repository at this point in the history
We already do health checks from the EmbeddedAnsibleWorker
so we don't really need OpenShift to do more, especially if they
have small built-in timeouts.

https://bugzilla.redhat.com/show_bug.cgi?id=1576744
  • Loading branch information
carbonin committed Jun 18, 2018
1 parent 90ff941 commit 69e29be
Showing 1 changed file with 5 additions and 22 deletions.
27 changes: 5 additions & 22 deletions lib/embedded_ansible/container_embedded_ansible.rb
Original file line number Diff line number Diff line change
Expand Up @@ -77,30 +77,13 @@ def create_ansible_deployment_config
dc[:spec][:template][:spec][:serviceAccountName] = settings.service_account

container = dc[:spec][:template][:spec][:containers].first
container[:ports] = [{:containerPort => 443}, {:containerPort => 80}]
container[:livenessProbe] = liveness_probe
container[:readinessProbe] = readiness_probe
container[:env] = container_environment
container[:image] = image

container[:ports] = [{:containerPort => 443}, {:containerPort => 80}]
container[:env] = container_environment
container[:image] = image
container[:securityContext] = {:privileged => true}
end
end

def liveness_probe
{
:tcpSocket => {:port => 443},
:initialDelaySeconds => 480,
:timeoutSeconds => 3
}
end

def readiness_probe
{
:httpGet => {:path => "/", :port => 443, :scheme => "HTTPS"},
:initialDelaySeconds => 200,
:timeoutSeconds => 3
}
container.delete(:livenessProbe)
end
end

def container_environment
Expand Down

0 comments on commit 69e29be

Please sign in to comment.