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 1d209e15
authored
Jan 10, 2024
by
chenxx
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
change output and add data node_name
1 parent
5bf5d367
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
1 deletions
main.tf
outputs.tf
schema.yaml
main.tf
View file @
1d209e1
...
...
@@ -111,6 +111,16 @@ data "kubernetes_service" "service" {
}
}
data "kubernetes_pod" "pods_info" {
depends_on = [module.deployment]
metadata {
name = local.name
namespace = local.namespace
}
node_name = data.kubernetes_pod.pods_info.spec.node_name
}
locals {
name = coalesce(var.name, "${var.walrus_metadata_service_name}")
namespace = coalesce(var.namespace, var.walrus_metadata_namespace_name)
...
...
outputs.tf
View file @
1d209e1
...
...
@@ -10,5 +10,10 @@ output "ports" {
output "ingress" {
description = "访问入口ingress"
value = var.domain_name
value = try(var.ingress_switch.domain_name, "未配置域名")
}
output "pod_in_node_name" {
description = "pod所在node的名字"
value = data.kubernetes_pod.pods_info.node_name
}
schema.yaml
View file @
1d209e1
...
...
@@ -9,6 +9,7 @@ components:
-
image
-
ingress_switch
-
name
-
namespace
properties
:
image
:
title
:
Image
...
...
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