Skip to content

Commit

Permalink
♻️ module checks if values file exists in root
Browse files Browse the repository at this point in the history
🔑 License update
  • Loading branch information
colinwilson committed Jan 1, 2022
1 parent 90ea1b4 commit 81ad938
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 10 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2021 AIGIS UK (Lotus Labs Ltd)
Copyright (c) 2022 AIGIS UK (Lotus Labs Ltd)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
6 changes: 3 additions & 3 deletions chart.tf
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ resource "helm_release" "traefik" {
# Helm chart deployment can sometimes take longer than the default 5 minutes
timeout = var.timeout_seconds

# If default_values == "" then apply default values from the chart if its anything else
# then apply values file using the values_file input variable
values = [var.default_values == "" ? var.default_values : file("${path.root}/${var.values_file}")]
# If values file specified by the var.values_file input variable exists then apply the values from this file
# else apply the default values from the chart
values = [fileexists("${path.root}/${var.values_file}") == true ? file("${path.root}/${var.values_file}") : ""]

set {
name = "deployment.replicas"
Expand Down
6 changes: 0 additions & 6 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,6 @@ variable "replica_count" {
default = 1
}

variable "default_values" {
description = "Specifies whether to use the traefik default values.yaml, or if set to anything else then to use your own custom values"
type = string
default = ""
}

variable "values_file" {
description = "The name of the traefik helmchart values file to use"
type = string
Expand Down

0 comments on commit 81ad938

Please sign in to comment.