Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose more Kubernetes configuration options #22

Open
camertron opened this issue Oct 12, 2020 · 0 comments
Open

Expose more Kubernetes configuration options #22

camertron opened this issue Oct 12, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@camertron
Copy link
Member

camertron commented Oct 12, 2020

Right now, these are the hoops you have to jump through if, for example, you want to change the deployment's readiness probe:

Kuby.definition('myapp') do
  environment(:production) do
    kubernetes do
      add_plugin(:rails_app) do
        deployment.spec.template.spec.container(:web).readiness_probe do
          timeout_seconds 1  # custom value goes here
        end
      end
    end
  end
end

Obviously that's neither obvious or discoverable, unless you're really familiar with Kuby's source code. Some config options like tls_enabled are already conveniently exposed as properties. It would be nice to expose a bunch of others as properties too. That way, modifying the readiness probe could be as easy as

add_plugin(:rails_app) do
  readiness_timeout 2
end

or even

add_plugin(:rails_app) do
  web_readiness_probe do
    timeout_seconds 2
  end
end

where the call to web_readiness_probe is just a convenience method that returns the web pod's readiness object (which is an instance of KubeDSL::DSL::V1::Probe).

@camertron camertron added the enhancement New feature or request label Oct 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant