Commit c2d986b1 by chenxx

add affinity and update limit cpu

1 parent 0bfc212a
......@@ -58,6 +58,9 @@ module "deployment" {
ip = host_list.ip
}
]
#affinity: default=true
prevent_deploy_on_the_same_node = var.prevent_deploy_on_the_same_node
}
module "service" {
......@@ -87,11 +90,11 @@ module "ingress" {
ingress_name = local.name
service_namespace = local.namespace
service_name = local.name
# annotations = {
# "nginx.ingress.kubernetes.io/proxy-send-timeout" = "360"
# "nginx.ingress.kubernetes.io/proxy-read-timeout" = "360"
# }
annotations = var.annotations
# annotations = {
# "nginx.ingress.kubernetes.io/proxy-send-timeout" = "360"
# "nginx.ingress.kubernetes.io/proxy-read-timeout" = "360"
# }
annotations = var.annotations
rule = [
{
......
......@@ -195,8 +195,9 @@ variable "rolling_update" {
variable "wait_for_rollout" {
default = true
}
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
default = true
}
\ No newline at end of file
......@@ -77,6 +77,7 @@ components:
- 0.5
- 1
- 2
- ""
nullable: true
x-walrus-ui:
group: Resources
......@@ -110,6 +111,7 @@ components:
- 1
- 2
- 3
- ""
nullable: true
x-walrus-ui:
group: Resources
......@@ -286,11 +288,26 @@ components:
title: Annotations
type: object
description: (Optional) Custom Annotations
default: {}
nullable: true
additionalProperties:
type: object
x-walrus-ui:
colSpan: 12
x-walrus-ui:
colSpan: 12
group: Advanced
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:
groupOrder:
- Basic
......
......@@ -150,7 +150,17 @@ variable "hosts" {
}
# @label "annotations"
# @group "advance"
variable "annotations" {
type = map(any)
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
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!