Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
terraform_module
/
lighttpd_standard_webservice
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 76441cb3
authored
May 17, 2024
by
chenxx
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
1
1 parent
4c8a5eb4
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
22 deletions
main.tf
variables.tf
main.tf
View file @
76441cb
terraform {
required_providers {
kubectl = {
source = "gavinbunney/kubectl"
version = "1.14.0"
}
}
}
module "deployment" {
module "deployment" {
# disable wait for all pods be ready.
# disable wait for all pods be ready.
#
#
...
@@ -81,8 +72,8 @@ module "service" {
...
@@ -81,8 +72,8 @@ module "service" {
]
]
}
}
module "ingress" {
module "ingress" {
count = var.ingress_switch.switch == "on" ? 1 : 0
count = var.ingress_switch.switch == "on" ? 1 : 0
source = "./modules/ingress/kubernetes"
source = "./modules/ingress/kubernetes"
...
@@ -102,18 +93,9 @@ module "ingress" {
...
@@ -102,18 +93,9 @@ module "ingress" {
}
}
data "kubernetes_service" "service" {
depends_on = [module.service]
metadata {
name = local.name
namespace = local.namespace
}
}
locals {
locals {
name = coalesce(var.name, "${var.walrus_metadata_service_name}")
name = coalesce(var.name, "${var.walrus_metadata_service_name}")
namespace = coalesce(var.namespace, var.walrus_metadata_namespace_name)
namespace = coalesce(var.namespace, var.walrus_metadata_namespace_name)
}
}
variables.tf
View file @
76441cb
...
@@ -106,14 +106,20 @@ variable "restart_policy" {
...
@@ -106,14 +106,20 @@ variable "restart_policy" {
# @label "chiose ingress switch on or off"
# @label "chiose ingress switch on or off"
# @options ["on", "off"]
# @options ["on", "off"]
# @group "
i
ngress"
# @group "
I
ngress"
variable "ingress_switch" {
variable "ingress_switch" {
type = object({
type = object({
switch = optional(string)
switch = optional(string)
path_type = optional(string
, "ImplementationSpecific"
)
path_type = optional(string)
path = optional(string
, "/"
)
path = optional(string)
domain_name = optional(string)
domain_name = optional(string)
})
})
default = {
switch = "off"
path_type = "ImplementationSpecific"
path = "/"
domain_name = null
}
description = "choise ingress switch"
description = "choise ingress switch"
}
}
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment