Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
terraform_module
/
scrm_standard_template
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 c2d986b1
authored
Jun 03, 2024
by
chenxx
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
add affinity and update limit cpu
1 parent
0bfc212a
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
38 additions
and
7 deletions
main.tf
modules/deployment/kubernetes/variables.tf
schema.yaml
variables.tf
main.tf
View file @
c2d986b
...
@@ -58,6 +58,9 @@ module "deployment" {
...
@@ -58,6 +58,9 @@ module "deployment" {
ip = host_list.ip
ip = host_list.ip
}
}
]
]
#affinity: default=true
prevent_deploy_on_the_same_node = var.prevent_deploy_on_the_same_node
}
}
module "service" {
module "service" {
...
@@ -87,11 +90,11 @@ module "ingress" {
...
@@ -87,11 +90,11 @@ module "ingress" {
ingress_name = local.name
ingress_name = local.name
service_namespace = local.namespace
service_namespace = local.namespace
service_name = local.name
service_name = local.name
# annotations = {
# annotations = {
# "nginx.ingress.kubernetes.io/proxy-send-timeout" = "360"
# "nginx.ingress.kubernetes.io/proxy-send-timeout" = "360"
# "nginx.ingress.kubernetes.io/proxy-read-timeout" = "360"
# "nginx.ingress.kubernetes.io/proxy-read-timeout" = "360"
# }
# }
annotations = var.annotations
annotations
= var.annotations
rule = [
rule = [
{
{
...
...
modules/deployment/kubernetes/variables.tf
View file @
c2d986b
...
@@ -195,8 +195,9 @@ variable "rolling_update" {
...
@@ -195,8 +195,9 @@ variable "rolling_update" {
variable "wait_for_rollout" {
variable "wait_for_rollout" {
default = true
default = true
}
}
variable "prevent_deploy_on_the_same_node" {
variable "prevent_deploy_on_the_same_node" {
description = "Pod pod_anti_affinity rule, which prevents deploy same pod on one node."
description = "Pod pod_anti_affinity rule, which prevents deploy same pod on one node."
type = bool
type = bool
default =
fals
e
default =
tru
e
}
}
\ No newline at end of file
\ No newline at end of file
schema.yaml
View file @
c2d986b
...
@@ -77,6 +77,7 @@ components:
...
@@ -77,6 +77,7 @@ components:
-
0.5
-
0.5
-
1
-
1
-
2
-
2
-
"
"
nullable
:
true
nullable
:
true
x-walrus-ui
:
x-walrus-ui
:
group
:
Resources
group
:
Resources
...
@@ -110,6 +111,7 @@ components:
...
@@ -110,6 +111,7 @@ components:
-
1
-
1
-
2
-
2
-
3
-
3
-
"
"
nullable
:
true
nullable
:
true
x-walrus-ui
:
x-walrus-ui
:
group
:
Resources
group
:
Resources
...
@@ -286,11 +288,26 @@ components:
...
@@ -286,11 +288,26 @@ components:
title
:
Annotations
title
:
Annotations
type
:
object
type
:
object
description
:
(Optional) Custom Annotations
description
:
(Optional) Custom Annotations
default
:
{}
nullable
:
true
nullable
:
true
additionalProperties
:
type
:
object
x-walrus-ui
:
colSpan
:
12
x-walrus-ui
:
x-walrus-ui
:
colSpan
:
12
colSpan
:
12
group
:
Advanced
group
:
Advanced
order
:
19
order
:
19
prevent_deploy_on_the_same_node
:
title
:
Prevent Deploy On The Same Node
type
:
boolean
description
:
Pod pod_anti_affinity rule, which prevents deploy same pod
on one node.
default
:
false
nullable
:
true
x-walrus-ui
:
group
:
Advanced
order
:
20
x-walrus-ui
:
x-walrus-ui
:
groupOrder
:
groupOrder
:
-
Basic
-
Basic
...
...
variables.tf
View file @
c2d986b
...
@@ -150,7 +150,17 @@ variable "hosts" {
...
@@ -150,7 +150,17 @@ variable "hosts" {
}
}
# @label "annotations"
# @group "advance"
variable "annotations" {
variable "annotations" {
type = map(any)
description = "(Optional) Custom Annotations"
description = "(Optional) Custom Annotations"
default = null
default = {}
}
# @label "affinity"
# @group "advance"
variable "prevent_deploy_on_the_same_node" {
description = "Pod pod_anti_affinity rule, which prevents deploy same pod on one node."
type = bool
default = false
}
}
\ No newline at end of file
\ No newline at end of file
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