IngressPublic: use Deployment with NodePort service
Spread replicas on different hosts.
Now PortAllocator allocates node ports as well.
Change-Id: Ia16cb24673fc6c61185f21ab30fde8964157aa4c
diff --git a/core/installer/values-tmpl/ingress-public.cue b/core/installer/values-tmpl/ingress-public.cue
index 619f15a..e675fc9 100644
--- a/core/installer/values-tmpl/ingress-public.cue
+++ b/core/installer/values-tmpl/ingress-public.cue
@@ -46,10 +46,41 @@
values: {
fullnameOverride: "\(global.pcloudEnvName)-ingress-public"
controller: {
- kind: "DaemonSet"
- hostNetwork: true
- hostPort: enabled: true
- service: enabled: false
+ kind: "Deployment"
+ replicaCount: 1 // TODO(gio): configurable
+ topologySpreadConstraints: [{
+ labelSelector: {
+ matchLabels: {
+ "app.kubernetes.io/instance": "ingress-public"
+ }
+ }
+ maxSkew: 1
+ topologyKey: "kubernetes.io/hostname"
+ whenUnsatisfiable: "DoNotSchedule"
+ }]
+ hostNetwork: false
+ hostPort: enabled: false
+ updateStrategy: {
+ type: "RollingUpdate"
+ rollingUpdate: {
+ maxSurge: "100%"
+ maxUnavailable: "30%"
+ }
+ }
+ service: {
+ enabled: true
+ type: "NodePort"
+ nodePorts: {
+ http: 80
+ https: 443
+ tcp: {
+ "53": 53
+ }
+ udp: {
+ "53": 53
+ }
+ }
+ }
ingressClassByName: true
ingressClassResource: {
name: networks.public.ingressClass