generated from canonical/template-operator
-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9867563
commit 46328af
Showing
7 changed files
with
130 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Terraform module for traefik-k8s | ||
|
||
|
||
This module is in experimental status. It is not yet ready for production. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
resource "juju_application" "traefik" { | ||
name = var.app_name | ||
model = var.model_name | ||
trust = true | ||
charm { | ||
name = "traefik-k8s" | ||
channel = var.channel | ||
revision = var.revision | ||
} | ||
units = var.units | ||
config = var.config | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
output "app_name" { | ||
value = juju_application.traefik.name | ||
} | ||
|
||
output "requires" { | ||
value = { | ||
certificates = "certificates", | ||
experimental_forward_auth = "experimental-forward-auth", | ||
logging = "logging", | ||
tracing = "tracing", | ||
} | ||
} | ||
|
||
output "provides" { | ||
value = { | ||
grafana_dashboard = "grafana-dashboard", | ||
ingress = "ingress", | ||
ingress_per_unit = "ingress-per-unit", | ||
metrics_endpoint = "metrics-endpoint", | ||
traefik_route = "traefik-route", | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
variable "app_name" { | ||
description = "Application name" | ||
type = string | ||
} | ||
|
||
variable "channel" { | ||
description = "Charm channel" | ||
type = string | ||
default = "latest/stable" | ||
} | ||
|
||
variable "config" { | ||
description = "Config options as in the ones we pass in juju config" | ||
type = map(string) | ||
default = {} | ||
} | ||
|
||
# We use constraints to set AntiAffinity in K8s | ||
# https://discourse.charmhub.io/t/pod-priority-and-affinity-in-juju-charms/4091/13?u=jose | ||
variable "constraints" { | ||
description = "Constraints to be applied" | ||
type = string | ||
default = "" | ||
} | ||
|
||
variable "model_name" { | ||
description = "Model name" | ||
type = string | ||
} | ||
|
||
variable "revision" { | ||
description = "Charm revision" | ||
type = number | ||
nullable = true | ||
default = null | ||
} | ||
|
||
variable "units" { | ||
description = "Number of units" | ||
type = number | ||
default = 1 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
terraform { | ||
required_version = ">= 1.5" | ||
required_providers { | ||
juju = { | ||
source = "juju/juju" | ||
version = "~> 0.14" | ||
} | ||
} | ||
} |