Terraform module to deploy jenkins on kubernetes
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Christophe van de Kerchove c87ca4e6b4
feat: Add variable to disable init-container
1 week ago
examples fix: example 4 months ago
.gitignore Import code to deploy jenkins on an existing eks cluster 1 year ago
.pre-commit-config.yaml feat: Add variable to disable init-container 1 week ago
CHANGELOG.md feat: Add variable to disable init-container 1 week ago
Jenkinsfile ix/ typo 9 months ago
LICENSE Initial commit 1 year ago
README.md feat: Add variable to disable init-container 1 week ago
main.tf feat: Add variable to disable init-container 1 week ago
outputs.tf refactoring: (BREAKING) Complete rehaul of the module. 6 months ago
variables.tf feat: Add variable to disable init-container 1 week ago
versions.tf refactoring: (BREAKING) Complete rehaul of the module. 6 months ago

README.md

terraform-module-kubernetes-jenkins

Terraform module to deploy jenkins on kubernetes

Requirements

Name Version
terraform >= 0.12
kubernetes >= 1.10.0
random >= 2.0.0

Providers

Name Version
kubernetes >= 1.10.0
random >= 2.0.0

Inputs

Name Description Type Default Required
additionnal_ingress_paths A list of map of additionnal ingress path to add. Map must support the following structure:
* service_name (optional, string): The name of the kubernates service. (e.g. ssl-redirect)
* service_port (optional, string): The service port number (e.g. use-annotation).
* path (optional, string): The path to the service

For example, see folder examples/without-pvc.
list [] no
annotations Map of annotations that will be applied on all resources. map {} no
enabled Whether or not to enable this module. bool true no
image Image to use. string "fxinnovation/jenkins" no
image_version Version of the image to use. string "3.38.0" no
ingress_annotations Map of annotations that will be applied on the ingress. map {} no
ingress_enabled Whether or not to enable the ingress. bool true no
ingress_host Host on which the ingress wil be available (ex: nexus.example.com). string "example.com" no
ingress_labels Map of labels that will be applied on the ingress. map {} no
ingress_name Name of the ingress. string "jenkins" no
ingress_tls_enabled Whether or not TLS should be enabled on the ingress. bool true no
ingress_tls_secret_name Name of the secret to use to put TLS on the ingress. string "jenkins" no
jnlp_port Port that will be set on the kubernetes resources for the JNLP connection. *Still has to be managed in the application.* number 50000 no
labels Map of labels that will be applied on all resources. map {} no
namespace Name of the namespace in which to deploy the module. string "default" no
resources_limits_cpu Amount of cpu time that the application limits. string "2" no
resources_limits_memory Amount of memory that the application limits. string "4096Mi" no
resources_requests_cpu Amount of cpu time that the application requests. string "1" no
resources_requests_memory Amount of memory that the application requests. string "2048Mi" no
role_additionnal_rules List of objects representing additionnal rules to add on the role. *All fields are required.*
list(
object({
api_groups = list(string) # List of api_groups to apply the verbs on
resources = list(string) # List of resources to apply the verbs on
resource_names = list(string) # List of the resource names to apply the verbs on
verbs = list(string) # List of verbs to apply
})
)
[] no
role_annotations Map of annotations that is merged on the role. map {} no
role_binding_annotations Map of annotations that is merged on the role binding map {} no
role_binding_labels Map of labels that is merged on the role binding map {} no
role_binding_name Name of the role binding for jenkins string "jenkins" no
role_labels Map of labels that is merged on the role. map {} no
role_name Name of the role. string "jenkins" no
service_account_annotations Map of annotations that is merged on the service account. map {} no
service_account_labels Map of labels that is merged on the service account. map {} no
service_account_name Name of the service account that run jenkins string "jenkins" no
service_annotations Map of annotations that will be applied on the service. map {} no
service_labels Map of labels that will be applied on the service. map {} no
service_name Name of the service. string "jenkins" no
stateful_set_annotations Map of annotations that will be applied on the statefulset. map {} no
stateful_set_automount_service_account_token Whether or not to mount the service account token in the pods. bool true no
stateful_set_init_container_enabled Whether or not to use the init-container or not. The init container is used to chown the data, which is safer, but on bigger Jenkins's this can take a while. bool true no
stateful_set_labels Map of labels that will be applied on the statefulset. map {} no
stateful_set_name Name of the statefulset to deploy. string "jenkins" no
stateful_set_template_annotations Map of annotations that will be applied on the statefulset template. map {} no
stateful_set_template_labels Map of labels that will be applied on the statefulset template. map {} no
stateful_set_volume_claim_template_annotations Map of annotations that will be applied on the statefulset volume claim template. map {} no
stateful_set_volume_claim_template_enabled Whether or not to enable the volume claim template on the statefulset. bool true no
stateful_set_volume_claim_template_labels Map of labels that will be applied on the statefulset volume claim template. map {} no
stateful_set_volume_claim_template_name Name of the statefulset's volume claim template. string "jenkins" no
stateful_set_volume_claim_template_requests_storage Size of storage the stateful set volume claim template requests. string "200Gi" no
stateful_set_volume_claim_template_storage_class Storage class to use for the stateful set volume claim template. any null no

Outputs

Name Description
ingress n/a
namespace_name n/a
role n/a
role_binding n/a
service n/a
service_account n/a
statefulset n/a